diff --git a/mitama/command/debug.py b/mitama/command/debug.py index 1f36eaf..8344ad2 100644 --- a/mitama/command/debug.py +++ b/mitama/command/debug.py @@ -11,11 +11,14 @@ class Command: def handle(self, argv = None): + config = get_from_project_dir() try: port = argv[0] except IndexError: - port = '8080' - config = get_from_project_dir() + if hasattr(config, 'port'): + port = config.port + else: + port = '8080' if not hasattr(config, 'ssl'): config.ssl = False app_registry = AppRegistry() diff --git a/mitama/command/run.py b/mitama/command/run.py index 0a25c9a..3edef45 100755 --- a/mitama/command/run.py +++ b/mitama/command/run.py @@ -14,7 +14,10 @@ def handle(self, argv = None): try: port = argv[0] except IndexError: - port = '8080' + if hasattr(config, 'port'): + port = config.port + else: + port = '8080' config = get_from_project_dir() if not hasattr(config, 'ssl'): config.ssl = False