Blame 0003-client-python-Do-not-try-to-unlink-None.patch

5bd6282
From 60c8ec5f937a28a5ec3d37f5d808c74fc4ef5735 Mon Sep 17 00:00:00 2001
5bd6282
From: Matej Marusak <mmarusak@redhat.com>
5bd6282
Date: Tue, 5 Sep 2017 10:48:31 +0200
5bd6282
Subject: [PATCH 3/4] client-python: Do not try to unlink None
5bd6282
5bd6282
Rhbz: #1416277
5bd6282
5bd6282
https://github.com/abrt/libreport/blob/master/src/client-python/reportclient/dnfdebuginfo.py#L135
5bd6282
returns None when downloading fails.
5bd6282
5bd6282
Signed-off-by: Matej Marusak <mmarusak@redhat.com>
5bd6282
---
5bd6282
 src/client-python/reportclient/debuginfo.py | 3 ++-
5bd6282
 1 file changed, 2 insertions(+), 1 deletion(-)
5bd6282
5bd6282
diff --git a/src/client-python/reportclient/debuginfo.py b/src/client-python/reportclient/debuginfo.py
5bd6282
index 0385f716..4390304e 100644
5bd6282
--- a/src/client-python/reportclient/debuginfo.py
5bd6282
+++ b/src/client-python/reportclient/debuginfo.py
5bd6282
@@ -374,7 +374,8 @@ class DebugInfoDownload(object):
5bd6282
                 # I observed a zero-length file left on error,
5bd6282
                 # which prevents cleanup later. Fix it:
5bd6282
                 try:
5bd6282
-                    os.unlink(package_full_path)
5bd6282
+                    if package_full_path is not None:
5bd6282
+                        os.unlink(package_full_path)
5bd6282
                 except OSError:
5bd6282
                     pass
5bd6282
                 print(_("Downloading package {0} failed").format(pkg))
5bd6282
-- 
5bd6282
2.13.5
5bd6282