def getObjFromUuid(self, objUuid): ncl('get obj from uuid:', objUuid) if type(objUuid) != unicode: print type(objUuid) raise 'error type' for i in self.objDb.find({"uuid":unicode(objUuid)}).sort("timestamp", -1): #Remove internal id del i["_id"] if not i.has_key("fullPath") and i.has_key("objUrl"): cl(i) i["fullPath"] = objTools.parseUrl(i["objUrl"])[1][1:] return i cl("no obj find for uuid:", objUuid) #raise "No obj found" return None
def __init__(self, objUrl, existingItemInfo = {}): self.objUrl = objUrl objPath = objTools.parseUrl(objUrl)[1][1:] ncl('ufsObj fullPath:', objPath) fsObj.__init__(self, objPath, existingItemInfo)