fix shutil.copy() exception. ticket #308 - regulate

This commit is contained in:
Marcos Pinto 2007-06-10 01:03:30 +00:00
parent baebb214fa
commit 1f6127160c
1 changed files with 7 additions and 1 deletions

View File

@ -593,7 +593,13 @@ class Manager:
full_new_name = os.path.join(self.base_dir, TORRENTS_SUBDIR, filename_short)
try:
shutil.copy(filename, full_new_name)
except Exception, e:
if str(e).find('are the same file'):
pass
else:
raise
# Create torrent object
new_torrent = torrent_info(full_new_name, save_dir, compact)