#2598 lib: better print with debug_xmlrpc
Merged a year ago by tkopecek. Opened a year ago by tkopecek.
tkopecek/koji issue2597  into  master

file modified
+5 -2
@@ -2702,8 +2702,11 @@ 

                  _val = callopts[_key]

                  if _key == 'data':

                      if six.PY3 and isinstance(_val, bytes):

-                         # convert to hex-string

-                         _val = '0x' + _val.hex()

+                         try:

+                             _val = _val.decode()

+                         except UnicodeDecodeError:

+                             # convert to hex-string

+                             _val = '0x' + _val.hex()

                      if len(_val) > 1024:

                          _val = _val[:1024] + '...'

                  self.logger.debug("%s: %r" % (_key, _val))

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

a year ago

I tested this and it works. Thanks!

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

a year ago

Commit 6a4f961 fixes this pull-request

Pull-Request has been merged by tkopecek

a year ago