def getFileByFileId(self, fileId, justPresent = True):
        cu = self.db.cursor()
        if justPresent:
            cu.execute("SELECT path, stream FROM DBTroveFiles "
                       "WHERE fileId=? AND isPresent = 1", fileId)
        else:
            cu.execute("SELECT path, stream FROM DBTroveFiles "
                       "WHERE fileId=?", fileId)
        # there could be multiple matches, but they should all be redundant
        try:
            path, stream = cu.next()
            return (path, stream)
        except __HOLE__:
            raise KeyError, fileId
dataset/ETHPy150Open sassoftware/conary/conary/local/sqldb.py/DBTroveFiles.getFileByFileId