diff --git a/pisi/build.py b/pisi/build.py index 661a3220..df9cb03b 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -13,7 +13,6 @@ # python standard library import os -import sys import glob import copy import stat @@ -417,7 +416,7 @@ class Builder: self.actionLocals[func]() else: if mandatory: - Error, _("unable to call function from actions: %s") %func + raise Error(_("unable to call function from actions: %s") % func) os.chdir(curDir) return True @@ -560,7 +559,7 @@ class Builder: except KeyError: pisi.util.strip_directory(install_dir) - def gen_metadata_xml(self, package, build_no=None): + def gen_metadata_xml(self, package): """Generate the metadata.xml file for build source. metadata.xml is composed of the information from specfile plus @@ -663,15 +662,15 @@ class Builder: ctx.ui.warning('Package file %s may be corrupt. Skipping.' % old_package_fn) for root, dirs, files in os.walk(ctx.config.compiled_packages_dir()): - for file in files: - locate_old_package(pisi.util.join_path(root,file)) + for f in files: + locate_old_package(pisi.util.join_path(root,f)) outdir=ctx.get_option('output_dir') if not outdir: outdir = '.' - for file in [pisi.util.join_path(outdir,entry) for entry in os.listdir(outdir)]: - if os.path.isfile(file): - locate_old_package(file) + for f in [pisi.util.join_path(outdir,entry) for entry in os.listdir(outdir)]: + if os.path.isfile(f): + locate_old_package(f) if not found: return (1, None)