Skip to content

Commit

Permalink
Ensure that mkdirs eventually stops.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thatch authored and ryneeverett committed Feb 25, 2020
1 parent 5c6162b commit d68c886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_files(inputs):
def makedirs(directory):
to_make = []

while True:
while directory:
try:
os.mkdir(directory)
except FileNotFoundError:
Expand Down

0 comments on commit d68c886

Please sign in to comment.