summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b1012b1)
This shall transform ugly stacktraces into aesthetically pleasant error
messages.
if file.endswith('.gz'):
open_method = gzip.open
if file.endswith('.gz'):
open_method = gzip.open
- return open_method(file, *args, **kwargs)
+ try:
+ return open_method(file, *args, **kwargs)
+ except FileNotFoundError:
+ sys.exit(f'[!] ERROR: unable to open {file}, are you sure it exists?')
+
def detect_arch(fname, archs):
def detect_arch(fname, archs):