Catch shutil.copy error

svn: r662
This commit is contained in:
Don Allingham
2001-12-25 04:59:24 +00:00
parent ef4a7665b2
commit c7a671b413

View File

@@ -310,6 +310,8 @@ class IndividualPage:
self.doc.start_table("gallery","IndTable")
for obj in my_list:
try:
shutil.copy(src,"%s/images/%s" % (self.dir,base))
self.doc.start_row()
self.doc.start_cell("ImageCell")
self.doc.start_paragraph("Data")
@@ -317,7 +319,6 @@ class IndividualPage:
base = os.path.basename(src)
self.doc.start_link("images/%s" % base)
self.doc.add_photo(src,"row",1.5,1.5)
shutil.copy(src,"%s/images/%s" % (self.dir,base))
self.doc.end_link()
self.doc.end_paragraph()
@@ -338,6 +339,8 @@ class IndividualPage:
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
except IOError:
pass
self.doc.end_table()