Skip to content

Commit

Permalink
FileType Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbob88 committed Apr 10, 2019
1 parent 46159d4 commit 14088ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ def get_args():
print('Updating {file} from {url}'.format(file=u'update.py', url=u'https://raw.githubusercontent.com/jimbob88/wheelers-wort-works/master/update.py'))
with open(resource_path('update.py'), 'w') as f:
f.write(update_text)
if os.path.splitext(args.file)[1] in ['.berf', '.berfx']:
beer_engine.__mode__ = __mode__
file = os.path.join(os.getcwd(), args.file) if not os.path.isfile(args.file) else os.path.expanduser(args.file)
beer_engine.main(file)
if args.file != None:
if os.path.splitext(args.file)[1] in ['.berf', '.berfx']:
beer_engine.__mode__ = __mode__
file = os.path.join(os.getcwd(), args.file) if not os.path.isfile(args.file) else os.path.expanduser(args.file)
beer_engine.main(file)
else:
beer_engine.__mode__ = __mode__
beer_engine.main()

0 comments on commit 14088ee

Please sign in to comment.