summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-09-08 20:06:56 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-09-08 20:06:56 -0400
commit1a2d69434c82dfdead06787b6a162892dceddb70 (patch)
tree675a2a56cab9bd0020e03c24d74164a1798e0757
parent5bb57ab91dcc9c82d7d36ff765044882f094dd0d (diff)
downloadrpmbuild-remote-1a2d69434c82dfdead06787b6a162892dceddb70.zip
rpmbuild-remote-1a2d69434c82dfdead06787b6a162892dceddb70.tar.gz
rpmbuild-remote-1a2d69434c82dfdead06787b6a162892dceddb70.tar.xz
Split out extensions check
-rw-r--r--rpmbuild-remote.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/rpmbuild-remote.py b/rpmbuild-remote.py
index 4c5334c..d03d751 100644
--- a/rpmbuild-remote.py
+++ b/rpmbuild-remote.py
@@ -11,6 +11,15 @@ import os
LOG = logging.getLogger('rpmbuild-remote')
LOG.addHandler(logging.StreamHandler())
+EXTENSIONS = (
+ 'patch',
+ 'bz2',
+ 'gz',
+ 'tgz',
+ 'lzma',
+ 'xz'
+)
+
def get_parser():
"""Return a commandline parser"""
parser = optparse.OptionParser(usage="%prog [options]... <files>...")
@@ -56,7 +65,7 @@ def main():
if ext == '.srpm' or ext == '.spec':
jobs.append([arg])
else:
- if ext not in ('.gz', '.tgz', '.bz2', '.patch'):
+ if ext not in EXTENSIONS:
LOG.warning("Uncommon source extension %s for file %s. "
"Please double check files." % (ext, arg))
if len(jobs) == 0: