Skip to content

Commit

Permalink
👹 Feed the hobgoblins (delint).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 20, 2024
1 parent a36a7fb commit 9dfde42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions portend.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def free(host, port, timeout=float('Inf')):
return
except PortNotFree:
if timer.expired():
raise Timeout("Port {port} not free on {host}.".format(**locals()))
raise Timeout(
"Port {port} not free on {host}.".format(**locals())
) from None
# Politely wait.
time.sleep(0.1)

Expand Down Expand Up @@ -234,7 +236,7 @@ def global_lookup(key):
args.func(args.target.host, args.target.port, timeout=args.timeout)
except Timeout as timeout:
print(timeout, file=sys.stderr)
raise SystemExit(1)
raise SystemExit(1) from None


__name__ == '__main__' and _main()

0 comments on commit 9dfde42

Please sign in to comment.