From ec7ebd78026a755764c09f18d4ed697e477768b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 13 May 2007 23:35:24 +0000 Subject: [PATCH] /usr/lib/pardus/pisi/build.py:420: Statement appears to have no effect /usr/lib/pardus/pisi/build.py:563: Parameter (build_no) not used /usr/lib/pardus/pisi/build.py:666: (file) shadows builtin /usr/lib/pardus/pisi/build.py:672: (file) shadows builtin --- pisi/build.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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)