notification: Fix running on Python 3
The input is given as unicode value, not a bytestring. We need universal newlines to handle the conversion as needed. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
e0308a74ff
commit
28c3bc6268
@ -86,6 +86,7 @@ class PungiNotifier(object):
|
|||||||
workdir=workdir,
|
workdir=workdir,
|
||||||
return_stdout=False,
|
return_stdout=False,
|
||||||
show_cmd=True,
|
show_cmd=True,
|
||||||
|
universal_newlines=True,
|
||||||
logfile=logfile)
|
logfile=logfile)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
if self.compose:
|
if self.compose:
|
||||||
|
@ -51,7 +51,7 @@ class TestNotifier(unittest.TestCase):
|
|||||||
stdin_data=json.dumps(data),
|
stdin_data=json.dumps(data),
|
||||||
can_fail=True, return_stdout=False,
|
can_fail=True, return_stdout=False,
|
||||||
workdir=self.compose.paths.compose.topdir.return_value,
|
workdir=self.compose.paths.compose.topdir.return_value,
|
||||||
show_cmd=True, logfile=self.logfile)
|
universal_newlines=True, show_cmd=True, logfile=self.logfile)
|
||||||
|
|
||||||
@mock.patch('pungi.util.translate_path')
|
@mock.patch('pungi.util.translate_path')
|
||||||
@mock.patch('kobo.shortcuts.run')
|
@mock.patch('kobo.shortcuts.run')
|
||||||
|
Loading…
Reference in New Issue
Block a user