Skip to content

Commit

Permalink
Merge pull request thtrieu#519 from abagshaw/master
Browse files Browse the repository at this point in the history
Only check existance of summary directory if flag is set
  • Loading branch information
abagshaw authored Jan 10, 2018
2 parents 178debe + abdb910 commit d9fe7fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions darkflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ def _get_dir(dirs):
for d in dirs:
this = os.path.abspath(os.path.join(os.path.curdir, d))
if not os.path.exists(this): os.makedirs(this)
_get_dir([FLAGS.imgdir, FLAGS.binary, FLAGS.backup,
os.path.join(FLAGS.imgdir,'out'), FLAGS.summary])

requiredDirectories = [FLAGS.imgdir, FLAGS.binary, FLAGS.backup, os.path.join(FLAGS.imgdir,'out')]
if FLAGS.summary:
requiredDirectories.append(FLAGS.summary)

_get_dir(requiredDirectories)

# fix FLAGS.load to appropriate type
try: FLAGS.load = int(FLAGS.load)
Expand Down

0 comments on commit d9fe7fc

Please sign in to comment.