mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-19 18:15:31 +01:00
Added try/except to the file moving to catch already-exists errors
This commit is contained in:
@@ -366,8 +366,11 @@ def moveFiles(albumpath, release, tracks):
|
||||
|
||||
for r,d,f in os.walk(albumpath):
|
||||
for files in f:
|
||||
shutil.move(os.path.join(r, files), destination_path)
|
||||
|
||||
try:
|
||||
shutil.move(os.path.join(r, files), destination_path)
|
||||
except shutil.Error, e:
|
||||
logger.warn('Error moving file %s: %s' % (files, e))
|
||||
|
||||
# Chmod the directories using the folder_format (script courtesy of premiso!)
|
||||
folder_list = folder.split('/')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user