fix shutil.copy() exception. ticket #308 - regulate
This commit is contained in:
parent
baebb214fa
commit
1f6127160c
|
@ -593,7 +593,13 @@ class Manager:
|
||||||
|
|
||||||
full_new_name = os.path.join(self.base_dir, TORRENTS_SUBDIR, filename_short)
|
full_new_name = os.path.join(self.base_dir, TORRENTS_SUBDIR, filename_short)
|
||||||
|
|
||||||
|
try:
|
||||||
shutil.copy(filename, full_new_name)
|
shutil.copy(filename, full_new_name)
|
||||||
|
except Exception, e:
|
||||||
|
if str(e).find('are the same file'):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
# Create torrent object
|
# Create torrent object
|
||||||
new_torrent = torrent_info(full_new_name, save_dir, compact)
|
new_torrent = torrent_info(full_new_name, save_dir, compact)
|
||||||
|
|
Loading…
Reference in New Issue