Skip to content

Commit

Permalink
only create vis folder when flag is set to true #56
Browse files Browse the repository at this point in the history
  • Loading branch information
famosab committed Apr 14, 2023
1 parent c8223ba commit 7bc550b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ def main(configpath=None):
rg.databases.initialise_database()

# check if the output directory is already present, if not create it
dir = os.path.join(config['out_path'] + 'visualization/')
if not os.path.isdir(config['out_path']):
logging.info('Given out_path is not yet a directory, creating ' + config['out_path'])
os.makedirs(config['out_path'])
if not os.path.isdir(dir):
os.makedirs(dir)
if (config['visualize']):
dir = os.path.join(config['out_path'] + 'visualization/')
if not os.path.isdir(dir):
os.makedirs(dir)

logging.info('Your output will be saved to ' + config['out_path'])

Expand Down

0 comments on commit 7bc550b

Please sign in to comment.