diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-07-16 17:15:03 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-11-14 14:47:21 +0200 |
commit | 2300f25516748ee58ab9258e7831b06b58884d46 (patch) | |
tree | 1c08133ae45e163957991da46390020ada85a425 /gbp | |
parent | 33ea083a124a4e60b50be7870cf14151bb5a7e0f (diff) | |
download | git-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-x | gbp/scripts/buildpackage_rpm.py | 11 |
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': |