Fixed building of paths for shutil.copy

svn: r664
This commit is contained in:
Don Allingham 2001-12-26 03:11:44 +00:00
parent 85fd4c3e5a
commit 1bb953aab8

View File

@ -311,12 +311,12 @@ class IndividualPage:
self.doc.start_table("gallery","IndTable") self.doc.start_table("gallery","IndTable")
for obj in my_list: for obj in my_list:
try: try:
src = obj.getReference().getPath()
base = os.path.basename(src)
shutil.copy(src,"%s/images/%s" % (self.dir,base)) shutil.copy(src,"%s/images/%s" % (self.dir,base))
self.doc.start_row() self.doc.start_row()
self.doc.start_cell("ImageCell") self.doc.start_cell("ImageCell")
self.doc.start_paragraph("Data") self.doc.start_paragraph("Data")
src = obj.getReference().getPath()
base = os.path.basename(src)
self.doc.start_link("images/%s" % base) self.doc.start_link("images/%s" % base)
self.doc.add_photo(src,"row",1.5,1.5) self.doc.add_photo(src,"row",1.5,1.5)
self.doc.end_link() self.doc.end_link()