Loading transfer_service/db_connector.py +3 −3 Original line number Diff line number Diff line Loading @@ -144,14 +144,14 @@ class DbConnector(object): WHERE position(base_path in cast(%s as varchar)) > 0; """, (path,)) result = self.cursor.fetchall()[0]["base_path"] result = self.cursor.fetchall() if result: return result return result[0]["base_path"] else: return False def getStorageBasePath(self, storageId): """Returns the storage base path fro a give storage id""" """Returns the storage base path for a give storage id""" if self.conn: self.cursor.execute("SELECT base_path FROM storage WHERE storage_id = %s;", (storageId,)) return self.cursor.fetchall()[0]["base_path"] Loading Loading
transfer_service/db_connector.py +3 −3 Original line number Diff line number Diff line Loading @@ -144,14 +144,14 @@ class DbConnector(object): WHERE position(base_path in cast(%s as varchar)) > 0; """, (path,)) result = self.cursor.fetchall()[0]["base_path"] result = self.cursor.fetchall() if result: return result return result[0]["base_path"] else: return False def getStorageBasePath(self, storageId): """Returns the storage base path fro a give storage id""" """Returns the storage base path for a give storage id""" if self.conn: self.cursor.execute("SELECT base_path FROM storage WHERE storage_id = %s;", (storageId,)) return self.cursor.fetchall()[0]["base_path"] Loading