[Core] Fix move_storage exception handling

This commit is contained in:
Calum Lind 2015-12-09 19:02:18 +00:00
parent e65a7ff2ea
commit 5d301a4b33

View File

@ -909,9 +909,10 @@ class Torrent(object):
try: try:
# Try to make the destination path if it doesn't exist # Try to make the destination path if it doesn't exist
os.makedirs(dest) os.makedirs(dest)
except IOError, e: except OSError, e:
log.exception(e) log.error("Could not move storage for torrent %s since %s does "
log.error("Could not move storage for torrent %s since %s does not exist and could not create the directory.", self.torrent_id, dest_u) "not exist and could not create the directory: %s",
self.torrent_id, dest, ex)
return False return False
kwargs = {} kwargs = {}