From 0a5b5f2380ee7fdeef9201210a951341bbaffc68 Mon Sep 17 00:00:00 2001 From: Babak Farrokhi Date: Mon, 9 May 2016 13:34:28 +0430 Subject: [PATCH] exit the pythonic way --- dnseval.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dnseval.py b/dnseval.py index 67af495..5dac690 100755 --- a/dnseval.py +++ b/dnseval.py @@ -54,13 +54,13 @@ usage: %s [-h] [-f server-list] [-c count] [-t type] [-w wait] hostname -w --wait maximum wait time for a reply (default: 5) -t --type DNS request record type (default: A) """ % (__PROGNAME__, __VERSION__, __PROGNAME__)) - exit() + sys.exit() def signal_handler(sig, frame): global shutdown if shutdown: # pressed twice, so exit immediately - exit(0) + sys.exit(0) shutdown = True # pressed once, exit gracefully @@ -198,7 +198,7 @@ def main(): except Exception as e: print('error: %s' % e) - exit(1) + sys.exit(1) if __name__ == '__main__':