Skip to content
Snippets Groups Projects
Commit cc01cd45 authored by Espen Sollum's avatar Espen Sollum
Browse files

Added verbose

parent f6087e1f
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@ SOURCE_DEST_DIRS = {
"*0000_reg2d.nc"]
}
VERBOSE=0
def copy_files(dry_run=False):
......@@ -38,8 +40,10 @@ def copy_files(dry_run=False):
if not os.path.isfile(dest):
if dry_run:
# Print the files that would be copied
print("Copying file (from/to)\n", src, dest)
print("Dry run: Copying file (from/to)\n", src, dest)
else:
if VERBOSE > 0:
print("Copying file (from/to)\n", src, dest)
shutil.copyfile(src, dest)
except Exception as e_err:
# Things that can go wrong: no write permission,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment