summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-07-16 17:15:03 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-14 14:47:21 +0200
commit2300f25516748ee58ab9258e7831b06b58884d46 (patch)
tree1c08133ae45e163957991da46390020ada85a425 /gbp
parent33ea083a124a4e60b50be7870cf14151bb5a7e0f (diff)
downloadgit-buildpackage-2300f25516748ee58ab9258e7831b06b58884d46.tar.gz
git-buildpackage-2300f25516748ee58ab9258e7831b06b58884d46.tar.bz2
git-buildpackage-2300f25516748ee58ab9258e7831b06b58884d46.zip
buildpackage-rpm: minor refactor
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rwxr-xr-xgbp/scripts/buildpackage_rpm.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/gbp/scripts/buildpackage_rpm.py b/gbp/scripts/buildpackage_rpm.py
index c84b0a2e..be938aae 100755
--- a/gbp/scripts/buildpackage_rpm.py
+++ b/gbp/scripts/buildpackage_rpm.py
@@ -591,14 +591,11 @@ def main(argv):
dst = os.path.join(spec_dir, f)
else:
dst = os.path.join(source_dir, f)
- try:
- if os.path.isdir(src):
- # dir is not packaging files, skip it
- continue
- else:
+ if not os.path.isdir(src):
+ try:
shutil.copy2(src, dst)
- except IOError, err:
- raise GbpError, "Error exporting files: %s" % err
+ except IOError as err:
+ raise GbpError, "Error exporting files: %s" % err
spec.specdir = os.path.abspath(spec_dir)
if options.orig_prefix != 'auto':