9334368
From a2bdf944c8855dd53b4df5f6829442f9f2f6bd14 Mon Sep 17 00:00:00 2001
9334368
From: Matej Habrnal <mhabrnal@redhat.com>
9334368
Date: Wed, 8 Jun 2016 17:50:18 +0200
9334368
Subject: [PATCH] a-a-install-debuginfo: Exception may not have an argument
9334368
 errno
9334368
9334368
Also BrokenPipe error can appear even in download_class(), moving it to try
9334368
block.
9334368
9334368
Related to #1343826, #1343664
9334368
9334368
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
9334368
---
9334368
 src/plugins/abrt-action-install-debuginfo.in | 6 +++---
9334368
 1 file changed, 3 insertions(+), 3 deletions(-)
9334368
9334368
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
9334368
index a3ef3da..be45bc6 100644
9334368
--- a/src/plugins/abrt-action-install-debuginfo.in
9334368
+++ b/src/plugins/abrt-action-install-debuginfo.in
9334368
@@ -236,12 +236,12 @@ if __name__ == "__main__":
9334368
             sys.exit(RETURN_FAILURE)
9334368
 
9334368
         # TODO: should we pass keep_rpms=keeprpms to DebugInfoDownload here??
9334368
-        downloader = download_class(cache=cachedirs[0], tmp=TMPDIR,
9334368
+        try:
9334368
+            downloader = download_class(cache=cachedirs[0], tmp=TMPDIR,
9334368
                                     noninteractive=noninteractive,
9334368
                                     repo_pattern=repo_pattern)
9334368
-        try:
9334368
             result = downloader.download(missing, download_exact_files=exact_fls)
9334368
-        except Exception as ex:
9334368
+        except OSError as ex:
9334368
             if ex.errno == errno.EPIPE:
9334368
                 clean_up(TMPDIR, silent=True)
9334368
                 exit(RETURN_FAILURE)
9334368
-- 
9334368
2.7.4
9334368