Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tfiedor committed Apr 20, 2024
1 parent f82f844 commit 1819ae7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions logki/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,16 @@ def process_command(buff):

def launch():
"""Launches logki"""
if len(sys.argv) != 2:
if len(sys.argv) == 2 and sys.argv[1] == '--version':
print(__VERSION__)
sys.exit(0)
elif len(sys.argv) == 2:
with BufferedLog(sys.argv[1]) as buffered_log:
application = create_app(buffered_log)
application.run()
else:
print("usage: ./logki.py <LOG>.log")
sys.exit(1)
elif len(sys.argv) == 1 and sys.argv[1] == '--version':
print(__VERSION__)
with BufferedLog(sys.argv[1]) as buffered_log:
application = create_app(buffered_log)
application.run()


if __name__ == "__main__":
Expand Down

0 comments on commit 1819ae7

Please sign in to comment.