diff options
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r-- | libpathod/pathoc.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index c85c207a..02d0c06d 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -224,7 +224,9 @@ class Pathoc(tcp.TCPClient): def main(args): try: - for i in range(args.repeat): + cnt = 0 + while 1: + cnt += 1 p = Pathoc( (args.host, args.port), ssl=args.ssl, @@ -258,5 +260,7 @@ def main(args): sys.stdout.flush() if ret and args.oneshot: sys.exit(0) + if cnt == args.repeat: + break except KeyboardInterrupt: pass |