def get_source_package(self, package): """ Get the DB entry for the source package. Return None if it doesn't exist. """ try: return dict(Source.load(package)) except KeyError: return None
def get_dsc(self, package): """ Get the .dsc path if the package is a valid source package. Otherwise return None. """ public = config['public'] package = Source.load(package) return "{public}/{pool}/{dsc}".format( public=public, pool=package['path'], dsc=package['dsc'], )