|
|
15a3e99 |
From c9878a3dca7e2fe48d88030c3c0c9cf1182face4 Mon Sep 17 00:00:00 2001
|
|
|
15a3e99 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
15a3e99 |
Date: Mon, 8 Dec 2014 11:00:17 +0100
|
|
|
15a3e99 |
Subject: [PATCH] report, client: fix minor python3 incompatibilities
|
|
|
15a3e99 |
|
|
|
15a3e99 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
15a3e99 |
---
|
|
|
15a3e99 |
src/client-python/__init__.py | 1 +
|
|
|
15a3e99 |
src/client-python/debuginfo.py | 4 ++--
|
|
|
15a3e99 |
src/report-python/__init__.py | 2 +-
|
|
|
15a3e99 |
src/report-python/libreport-meh-test.py | 6 +++---
|
|
|
15a3e99 |
4 files changed, 7 insertions(+), 6 deletions(-)
|
|
|
15a3e99 |
|
|
|
15a3e99 |
diff --git a/src/client-python/__init__.py b/src/client-python/__init__.py
|
|
|
15a3e99 |
index 8966f22..129149a 100644
|
|
|
15a3e99 |
--- a/src/client-python/__init__.py
|
|
|
15a3e99 |
+++ b/src/client-python/__init__.py
|
|
|
15a3e99 |
@@ -76,3 +76,4 @@ def error_msg(fmt, *args):
|
|
|
15a3e99 |
def error_msg_and_die(fmt, *args):
|
|
|
15a3e99 |
sys.stderr.write("%s\n" % (fmt % args))
|
|
|
15a3e99 |
sys.exit(1)
|
|
|
15a3e99 |
+
|
|
|
15a3e99 |
diff --git a/src/client-python/debuginfo.py b/src/client-python/debuginfo.py
|
|
|
15a3e99 |
index 67faa45..421a0aa 100644
|
|
|
15a3e99 |
--- a/src/client-python/debuginfo.py
|
|
|
15a3e99 |
+++ b/src/client-python/debuginfo.py
|
|
|
15a3e99 |
@@ -84,7 +84,7 @@ def unpack_rpm(package_file_name, files, tmp_dir, destdir, keeprpm, exact_files=
|
|
|
15a3e99 |
package_full_path = tmp_dir + "/" + package_file_name
|
|
|
15a3e99 |
log1("Extracting %s to %s", package_full_path, destdir)
|
|
|
15a3e99 |
log2("%s", files)
|
|
|
15a3e99 |
- print _("Extracting cpio from {0}").format(package_full_path)
|
|
|
15a3e99 |
+ print(_("Extracting cpio from {0}").format(package_full_path))
|
|
|
15a3e99 |
unpacked_cpio_path = tmp_dir + "/unpacked.cpio"
|
|
|
15a3e99 |
try:
|
|
|
15a3e99 |
unpacked_cpio = open(unpacked_cpio_path, 'wb')
|
|
|
15a3e99 |
@@ -447,7 +447,7 @@ class DebugInfoDownload(YumBase):
|
|
|
15a3e99 |
print _("Download cancelled by user")
|
|
|
15a3e99 |
return RETURN_CANCEL_BY_USER
|
|
|
15a3e99 |
|
|
|
15a3e99 |
- for pkg, files in package_files_dict.iteritems():
|
|
|
15a3e99 |
+ for pkg, files in package_files_dict.items():
|
|
|
15a3e99 |
dnlcb.downloaded_pkgs = downloaded_pkgs
|
|
|
15a3e99 |
repo.cache = 0
|
|
|
15a3e99 |
remote = pkg.returnSimple('relativepath')
|
|
|
15a3e99 |
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py
|
|
|
15a3e99 |
index 71e2d62..6c75eb1 100644
|
|
|
15a3e99 |
--- a/src/report-python/__init__.py
|
|
|
15a3e99 |
+++ b/src/report-python/__init__.py
|
|
|
15a3e99 |
@@ -236,7 +236,7 @@ def createPythonUnhandledExceptionSignature(**kwargs):
|
|
|
15a3e99 |
raise AttributeError("missing argument {0}".format(arg))
|
|
|
15a3e99 |
|
|
|
15a3e99 |
pd = problem_data()
|
|
|
15a3e99 |
- for (key, value) in kwargs.iteritems():
|
|
|
15a3e99 |
+ for (key, value) in kwargs.items():
|
|
|
15a3e99 |
pd.add(key, value)
|
|
|
15a3e99 |
product = getProduct()
|
|
|
15a3e99 |
if product:
|
|
|
15a3e99 |
--
|
|
|
15a3e99 |
2.1.0
|
|
|
15a3e99 |
|