Skip to content

Commit

Permalink
[fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
木瓜丸 committed Oct 4, 2020
1 parent 6c47c3b commit 1331550
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions mitama/command/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 4 additions & 1 deletion mitama/command/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1331550

Please sign in to comment.