summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authormb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-09 18:58:28 +0000
committermb <mb@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-09 18:58:28 +0000
commit21242b3716cc0bda59ae70046da3b2fd9e43e84a (patch)
tree146065140eb6f6ff3f8e316cf42509410774d960 /scripts
parent0757248ef18484a654d842b4a182aaf48d18a1e1 (diff)
dl_cleanup: Show it to the user, if file extension or version pattern is unknown
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19085 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dl_cleanup.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/dl_cleanup.py b/scripts/dl_cleanup.py
index 7adc475d4..48f587de5 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):