From 24e85fc9fa4ef5e06a5f02abc6d2c34ed531202d Mon Sep 17 00:00:00 2001 From: mkesenheimer Date: Thu, 30 Sep 2021 13:51:49 +0200 Subject: [PATCH] =?UTF-8?q?Fehlerabfrage=20hinzugef=C3=BCgt:=20Fehlende=20?= =?UTF-8?q?Config-Datei?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nand_dump_decoder.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nand_dump_decoder.py b/nand_dump_decoder.py index 30231bb..4f223cd 100755 --- a/nand_dump_decoder.py +++ b/nand_dump_decoder.py @@ -1373,10 +1373,15 @@ def banner(): else: # read configuration from given config file - if not os.path.isfile(args.config): + try: + if not os.path.isfile(args.config): + print("[-] Error: Config file '{}' does not exist".format(args.config)) + sys.exit(1) + except: print("[-] Error: Config file '{}' does not exist".format(args.config)) sys.exit(1) + print("[*] Read configuration file '{}'".format(args.config)) configfile = configparser.ConfigParser() try: