diff options
author | Michael Büsch <mb@bu3sch.de> | 2010-01-09 18:58:28 +0000 |
---|---|---|
committer | Michael Büsch <mb@bu3sch.de> | 2010-01-09 18:58:28 +0000 |
commit | ff6010a732bf4c38e3de852ac6b2f4571bf0147d (patch) | |
tree | c3ae4df9090216d1cc13b40eefb8aaa0f5a078ac /scripts | |
parent | bee5dab1a1ac8c2b2d2c12e86db5099a6c7d71c0 (diff) | |
download | master-31e0f0ae-ff6010a732bf4c38e3de852ac6b2f4571bf0147d.tar.gz master-31e0f0ae-ff6010a732bf4c38e3de852ac6b2f4571bf0147d.tar.bz2 master-31e0f0ae-ff6010a732bf4c38e3de852ac6b2f4571bf0147d.zip |
dl_cleanup: Show it to the user, if file extension or version pattern is unknown
SVN-Revision: 19085
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dl_cleanup.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/dl_cleanup.py b/scripts/dl_cleanup.py index 7adc475d4d..48f587de52 100755 --- a/scripts/dl_cleanup.py +++ b/scripts/dl_cleanup.py @@ -11,8 +11,6 @@ import os import re import getopt -DEBUG = 0 - # Commandline options opt_dryrun = False @@ -94,7 +92,7 @@ blacklist = [ (".fw", re.compile(r".*\.fw")), (".arm", re.compile(r".*\.arm")), (".bin", re.compile(r".*\.bin")), - ("rt-firmware", re.compile(r"RT\d+_Firmware.*")), + ("rt-firmware", re.compile(r"RT[\d\w]+_Firmware.*")), ] class EntryParseError(Exception): pass @@ -110,8 +108,7 @@ class Entry: filename = filename[0:0-len(ext)] break else: - if DEBUG: - print "Extension did not match on", filename + print self.filename, "has an unknown file-extension" raise EntryParseError("ext") for (regex, parseVersion) in versionRegex: match = regex.match(filename) @@ -119,8 +116,7 @@ class Entry: (self.progname, self.version) = parseVersion(match) break else: - if DEBUG: - print "Version regex did not match on", filename + print self.filename, "has an unknown version pattern" raise EntryParseError("ver") def deleteFile(self): |