diff options
author | Mattia Rizzolo <mattia@debian.org> | 2016-06-21 09:54:40 +0000 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-06-21 15:04:37 +0200 |
commit | ad1862b26b6531568d45d9364ad343ffec74f845 (patch) | |
tree | 09c5c0e9fbbb8cae2fe03ceadd995249d95d58e9 | |
parent | eda86ffb183927a6dbf698b3d174e5c732eec0f0 (diff) | |
download | jenkins.debian.net-ad1862b26b6531568d45d9364ad343ffec74f845.tar.xz |
reproducible: breakages: in alien_log(), correctly deal with different file names with different splitting needs
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-x | bin/reproducible_html_breakages.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py index af32e4fd..4119cf6d 100755 --- a/bin/reproducible_html_breakages.py +++ b/bin/reproducible_html_breakages.py @@ -139,8 +139,15 @@ def alien_log(directory=None): continue suite, arch = root.rsplit('/', 2)[1:] for file in files: + # different file have differnt name patterns and different splitting needs + if file.endswith('.diff.gz'): + rsplit_level = 2 + elif file.endswith('.gz'): + rsplit_level = 3 + else: + rsplit_level = 2 try: - pkg, version = file.rsplit('.', 2)[0].rsplit('_', 1) + pkg, version = file.rsplit('.', rsplit_level)[0].rsplit('_', 1) except ValueError: log.critical(bcolors.FAIL + '/'.join([root, file]) + ' does not seem to be a file that should be there' |