From 729925043754cc89e3cbaf232fb1f47f7e9010ec Mon Sep 17 00:00:00 2001 From: janis Date: Wed, 7 Jun 2023 09:04:04 +0200 Subject: [PATCH] fix crash of CLI when no input file specified --- bin/__pycache__/handler.cpython-311.pyc | Bin 10706 -> 10711 bytes bin/__pycache__/probe.cpython-311.pyc | Bin 3781 -> 3777 bytes smuL-cli.py | 14 +++++++++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/__pycache__/handler.cpython-311.pyc b/bin/__pycache__/handler.cpython-311.pyc index 654578320f5f8eaf839fdcfe48a8cddcbe5f48a5..8548fb77f117319c963b97a44b0866513f2625cc 100644 GIT binary patch delta 158 zcmcZj1}7)xq!#&P zmZWap&UlTH(Q$Ggv(e@w%(K{>g1ER8u&PwhRR}ZGGt@KS;?hXgR4_6yGRCfO^DM4F WCa&y@9JyCGaxZY?ZvM)1R|WvrR5Z2# delta 154 zcmcZ}d?}cBIWI340}xnyRi`}M$lJ##vx!TK6A0XbgFJH+(^JDTQ&RIo3yPByb5e^o z?_#{h$mlwGBC`=oykBbh=EKah*lc{bxD+teD(EVN8R{A88E|oFBx@=d85kL3QMGwK YS0EEt>P3$9D;((;IMO%&;<+mW0H~}oZU6uP diff --git a/bin/__pycache__/probe.cpython-311.pyc b/bin/__pycache__/probe.cpython-311.pyc index 99d204e20ef47ae6d2e104664b4a633b801b0147..cd2cf334c60e68ac0bb6767b405da7375df88ebd 100644 GIT binary patch delta 31 lcmX>qdr+2pIWI340}u$ClyBrd#ms0w`5Lp)W*(NETmXPr2toh= delta 36 rcmX>odsLQtIWI340}$N*TC$P*6f>jq ERROR: Input file required! <==\n\n' ) ap.print_usage(); return False + + output = args.outputfile; + if ( args.outputfile == None or args.outputfile == '' ): + output = args.inputfile[ :len( args.inputfile ) - 4 ] + '_upscaled' + args.inputfile[ len( args.inputfile ) - 4: ] # check if output file exists and if, prompt user if it should be overwritten and remove if, if yes if ( os.path.exists( output ) ): @@ -127,11 +131,11 @@ if __name__ == '__main__': multiprocessing.freeze_support(); - output = args.outputfile; - if ( args.outputfile == None or args.outputfile == '' ): - output = args.inputfile[ :len( args.inputfile ) - 4 ] + '_upscaled' + args.inputfile[ len( args.inputfile ) - 4: ] + if ( performChecks( args, ap ) ): + output = args.outputfile; + if ( args.outputfile == None or args.outputfile == '' ): + output = args.inputfile[ :len( args.inputfile ) - 4 ] + '_upscaled' + args.inputfile[ len( args.inputfile ) - 4: ] - if ( performChecks( args, ap, output ) ): mode = 'fsr' if ( args.mode != None ): mode = args.mode