Skip to content

Commit

Permalink
Print usefully detailed tracebacks with -v
Browse files Browse the repository at this point in the history
  • Loading branch information
dlenski committed Apr 13, 2024
1 parent a723b61 commit d698fdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion what_vpn/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def main():
ex = 'connection error'
except Exception as e:
if args.verbose > 1:
print('\nException in {} sniffer: {!r}\n'.format(desc, e))
import traceback
print('\nException in {} sniffer:'.format(desc))
traceback.print_exc()
ex = e.__class__.__name__
else:
ex = 'no match'
Expand Down

0 comments on commit d698fdf

Please sign in to comment.