From 1a2d69434c82dfdead06787b6a162892dceddb70 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 8 Sep 2009 20:06:56 -0400 Subject: Split out extensions check --- rpmbuild-remote.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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]... ...") @@ -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: -- cgit