Fix small bug with argument counting

This commit is contained in:
Niles Rogoff 2017-02-10 18:40:39 -05:00
parent 6333f47e70
commit b1b065d5c3
No known key found for this signature in database
GPG Key ID: B78B908F23430F80
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ null = open(os.devnull, "w")
infile = sys.argv[1]
outfile = ".".join(sys.argv[1].split(".")[:-1]) + "-waifu2x.png"
noise_level = False
if len(sys.argv) == 2:
if len(sys.argv) == 3:
if sys.argv[2] in ["0", "1", "2"]:
print("Assuming you don't want to write to a file named " + sys.argv[2])
noise_level = int(sys.argv[2])