Skip to content

Commit

Permalink
Move 'import sys' to the top to allow reusing the script in non-cli m…
Browse files Browse the repository at this point in the history
…ode (fixes #12)
  • Loading branch information
Hagen Fritsch committed Apr 2, 2024
1 parent d9e049f commit 2e9d717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onlineticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import os
import re
import struct
import sys
import zlib

try: # pip install pycryptodome
Expand Down Expand Up @@ -528,7 +529,6 @@ def fix_zxing(data):
return data

if __name__ == '__main__':
import sys
if len(sys.argv) < 2:
print('Usage: %s [ticket_files]' % sys.argv[0])
ots = {}
Expand Down

0 comments on commit 2e9d717

Please sign in to comment.