@return: list of Suite objects for the given package
"""
- ret = session.query(Suite).join(BinAssociation).join(DBBinary).filter_by(package=package).all()
-
- return ret
+ return session.query(Suite).join(BinAssociation).join(DBBinary).filter_by(package=package).all()
__all__.append('get_suites_binary_in')
@return: list of DBBinary objects for the given name (may be empty)
"""
- ret = session.query(DBBinary).filter_by(source_id=source_id).all()
-
- return ret
+ return session.query(DBBinary).filter_by(source_id=source_id).all()
__all__.append('get_binaries_from_source_id')
AND su.suite_name=:suitename
ORDER BY b.version DESC"""
- ret = session.execute(sql, {'package': package, 'suitename': suitename})
-
- return ret
+ return session.execute(sql, {'package': package, 'suitename': suitename})
__all__.append('get_binary_from_name_suite')
vals = {'package': package, 'suitename': suitename, 'arch': arch}
- ret = session.execute(query, vals)
-
- return ret
+ return session.execute(query, vals)
__all__.append('get_binary_components')
contents_q += " ORDER BY fn"
- ret = session.execute(contents_q, vals)
-
- return ret
+ return session.execute(contents_q, vals)
__all__.append('get_contents')
if poolfile_id is not None:
q = q.filter_by(poolfile_id=poolfile_id)
- ret = q.all()
-
- return ret
+ return q.all()
__all__.append('get_dscfiles')
if location_id is not None:
q = q.join(Location).filter_by(location_id=location_id)
- ret = q.all()
-
- return ret
+ return q.all()
__all__.append('get_poolfile_by_name')
# TODO: There must be a way of properly using bind parameters with %FOO%
q = session.query(PoolFile).filter(PoolFile.filename.like('%%%s%%' % filename))
- ret = q.all()
-
- return ret
+ return q.all()
__all__.append('get_poolfile_like_name')
q = q.filter_by(package=package)
q = q.filter_by(version=version)
- ret = q.count() > 0
-
- return ret
+ return bool(q.count() > 0)
__all__.append('has_new_comment')
if version is not None: q = q.filter_by(version=version)
if comment_id is not None: q = q.filter_by(comment_id=comment_id)
- ret = q.all()
-
- return ret
+ return q.all()
__all__.append('get_new_comments')
if not isinstance(overridetype, list): overridetype = [overridetype]
q = q.join(OverrideType).filter(OverrideType.overridetype.in_(overridetype))
- ret = q.all()
-
- return ret
+ return q.all()
__all__.append('get_override')
except NoResultFound:
return None
- return ret
-
__all__.append('get_override_type')
################################################################################
@return: list of Suite objects for the given source
"""
- ret = session.query(Suite).join(SrcAssociation).join(DBSource).filter_by(source=source).all()
-
- return ret
+ return session.query(Suite).join(SrcAssociation).join(DBSource).filter_by(source=source).all()
__all__.append('get_suites_source_in')
if dm_upload_allowed is not None:
q = q.filter_by(dm_upload_allowed=dm_upload_allowed)
- ret = q.all()
-
- return ret
+ return q.all()
__all__.append('get_sources_from_name')
q = q.order_by('arch_string')
- ret = q.all()
-
- return ret
+ return q.all()
__all__.append('get_suite_architectures')