Changeset 37:ead830ce45d6 in documentViewer
- Timestamp:
- Apr 12, 2006, 6:53:00 PM (19 years ago)
- Branch:
- default
- Tags:
- Root_roc_1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r35 r37 178 178 zLOG.LOG("documentViewer (getdirinfofromdigilib)", zLOG.ERROR, "error reading %s (try %d)"%(imageUrl,cnt)) 179 179 else: 180 raise IOError("Unable to get dir info from %s"%(imageUrl))181 182 params=dom.xpath("//dir/size")183 zLOG.LOG("documentViewer (getparamfromdigilib)", zLOG.INFO, "dirInfo:size"% params)184 185 if params:186 docinfo['numPages'] = int(getTextFromNode( params[0]))180 raise IOError("Unable to get dir-info from %s"%(imageUrl)) 181 182 sizes=dom.xpath("//dir/size") 183 zLOG.LOG("documentViewer (getparamfromdigilib)", zLOG.INFO, "dirInfo:size"%sizes) 184 185 if sizes: 186 docinfo['numPages'] = int(getTextFromNode(sizes[0])) 187 187 else: 188 188 docinfo['numPages'] = 0 … … 200 200 except: 201 201 zLOG.LOG("documentViewer (getIndexMata)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) 202 raise IOError("Unable to get infofrom %s"%(url))202 raise IOError("Unable to read index.meta from %s"%(url)) 203 203 else: 204 204 # online path … … 211 211 except: 212 212 zLOG.LOG("documentViewer (getIndexMata)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) 213 raise IOError("Unable to get infofrom %s"%(url))213 raise IOError("Unable to read index meta from %s"%(url)) 214 214 215 215 return dom … … 218 218 def getAuthinfoFromIndexMeta(self,path,docinfo=None,dom=None): 219 219 """gets authorization info from the index.meta file at path or given by dom""" 220 zLOG.LOG("documentViewer (get bibinfofromindexmeta)", zLOG.INFO,"path: %s"%(path))220 zLOG.LOG("documentViewer (getauthinfofromindexmeta)", zLOG.INFO,"path: %s"%(path)) 221 221 222 222 access = None … … 294 294 imageDir=getTextFromNode(imageDirs[0]) 295 295 else: 296 imageDir=None 296 # we balk with no image tag 297 raise IOError("No text-tool info in %s"%(url)) 297 298 298 299 if imageDir and archivePath: … … 353 354 else: 354 355 zLOG.LOG("documentViewer (getdocinfo)", zLOG.ERROR,"unknown mode!") 356 raise ValueError("Unknown mode %s"%(mode)) 357 355 358 zLOG.LOG("documentViewer (getdocinfo)", zLOG.INFO,"docinfo: %s"%docinfo) 356 359 self.REQUEST.SESSION['docinfo'] = docinfo
Note: See TracChangeset
for help on using the changeset viewer.