Skip to content

Commit

Permalink
simpilfy logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nggit committed Dec 31, 2024
1 parent 36d9bd1 commit 26b5040
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tremolo/tremolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ async def _serve(self, host, port, **options):
# '/path/to/module.py' -> 'module:app' (dir: '/path/to')
# '/path/to/module.py:myapp' -> 'module:myapp' (dir: '/path/to')

if (':\\' in options['app'] and options['app'].count(':') < 2 or
':' not in options['app']):
if options['app'].find(':', options['app'].find(':\\') + 1) == -1:
options['app'] += ':app'

path, attr_name = options['app'].rsplit(':', 1)
Expand Down

0 comments on commit 26b5040

Please sign in to comment.