fix up exception to not crash with further unset variables

This commit is contained in:
2021-07-22 19:48:02 +10:00
parent 915063a7a7
commit 347532daef

View File

@@ -764,7 +764,7 @@ def MoveFileToNewFolderInStorage(job,move_me, dst_storage_path, dst_rel_path):
os.replace( src, dst ) os.replace( src, dst )
print( f"would mv {src} {dst}" ) print( f"would mv {src} {dst}" )
except Exception as e: except Exception as e:
print( f"ERROR: Failed to move file to new location on filesystem - which={src}, location={dir}, err: {e}") print( f"ERROR: Failed to move file to new location on filesystem, err: {e}")
# need these for AddDir calls below to work # need these for AddDir calls below to work
parent_dir=session.query(Dir).join(PathDirLink).filter(PathDirLink.path_id==dst_storage_path.id).first() parent_dir=session.query(Dir).join(PathDirLink).filter(PathDirLink.path_id==dst_storage_path.id).first()