Blame 0001-deps-Handle-malformed-output-from-rpm-bz-1049042.patch
|
Stanislav Ochotnicky |
f25f398 |
From b4467ce8151d2157fda8f10e488d0c22f009b1fd Mon Sep 17 00:00:00 2001
|
|
Stanislav Ochotnicky |
f25f398 |
From: Alec Leamas <leamas.alec@gmail.com>
|
|
Stanislav Ochotnicky |
f25f398 |
Date: Tue, 7 Jan 2014 00:56:08 +0100
|
|
Stanislav Ochotnicky |
f25f398 |
Subject: [PATCH 1/3] deps: Handle malformed output from rpm (bz #1049042)
|
|
Stanislav Ochotnicky |
f25f398 |
|
|
Stanislav Ochotnicky |
f25f398 |
---
|
|
Stanislav Ochotnicky |
f25f398 |
src/FedoraReview/deps.py | 6 +++++-
|
|
Stanislav Ochotnicky |
f25f398 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
Stanislav Ochotnicky |
f25f398 |
|
|
Stanislav Ochotnicky |
f25f398 |
diff --git a/src/FedoraReview/deps.py b/src/FedoraReview/deps.py
|
|
Stanislav Ochotnicky |
f25f398 |
index 547de5e..5bdc462 100644
|
|
Stanislav Ochotnicky |
f25f398 |
--- a/src/FedoraReview/deps.py
|
|
Stanislav Ochotnicky |
f25f398 |
+++ b/src/FedoraReview/deps.py
|
|
Stanislav Ochotnicky |
f25f398 |
@@ -99,7 +99,11 @@ def list_dirs(pkg_filename):
|
|
Stanislav Ochotnicky |
f25f398 |
line = rpm.stdout.next().strip()
|
|
Stanislav Ochotnicky |
f25f398 |
except StopIteration:
|
|
Stanislav Ochotnicky |
f25f398 |
return dirs
|
|
Stanislav Ochotnicky |
f25f398 |
- path, mode = line.rsplit(None, 10)[0:5:4]
|
|
Stanislav Ochotnicky |
f25f398 |
+ try:
|
|
Stanislav Ochotnicky |
f25f398 |
+ path, mode = line.rsplit(None, 10)[0:5:4]
|
|
Stanislav Ochotnicky |
f25f398 |
+ except ValueError:
|
|
Stanislav Ochotnicky |
f25f398 |
+ # E. g., when given '(contains no files)'
|
|
Stanislav Ochotnicky |
f25f398 |
+ continue
|
|
Stanislav Ochotnicky |
f25f398 |
mode = int(mode, 8)
|
|
Stanislav Ochotnicky |
f25f398 |
if mode & 040000:
|
|
Stanislav Ochotnicky |
f25f398 |
dirs.append(path)
|
|
Stanislav Ochotnicky |
f25f398 |
--
|
|
Stanislav Ochotnicky |
f25f398 |
1.8.4.2
|
|
Stanislav Ochotnicky |
f25f398 |
|