From d68c886535f33be4704e4fc942fb17f8ace79280 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Tue, 25 Feb 2020 03:38:26 -0800 Subject: [PATCH] Ensure that mkdirs eventually stops. With the default value for `--output` that doesn't have a `/` in it, this would loop forever. Now ensure that it only loops once per path component. --- mkcodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkcodes.py b/mkcodes.py index 2307b61..25e6a09 100644 --- a/mkcodes.py +++ b/mkcodes.py @@ -91,7 +91,7 @@ def get_files(inputs): def makedirs(directory): to_make = [] - while True: + while directory: try: os.mkdir(directory) except FileNotFoundError: