diff --git a/companion.py b/companion.py index 11b79e00..a9af1052 100644 --- a/companion.py +++ b/companion.py @@ -276,7 +276,7 @@ class Auth(object): config.save() # Save settings now for use by command-line app def dump(self, r): - print('Auth\t' + r.url, r.status_code, r.reason and r.reason.decode('utf-8') or 'None', r.text.encode('utf-8')) + print('Auth\t' + r.url, r.status_code, r.reason and r.reason or 'None', r.text) def base64URLEncode(self, text): return base64.urlsafe_b64encode(text).decode().replace('=', '') diff --git a/plugins/eddn.py b/plugins/eddn.py index 2b6c4fba..674d2025 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -100,7 +100,7 @@ class EDDN(object): uploaderID = uuid.uuid4().hex config.set('uploaderID', uploaderID) else: - uploaderID = cmdr.encode('utf-8') + uploaderID = cmdr msg = OrderedDict([ ('$schemaRef', msg['$schemaRef']), @@ -112,12 +112,13 @@ class EDDN(object): ('message', msg['message']), ]) + print('plugins/eddn.py:send(): msg[header][softwareName] = "{}"'.format(msg['header']['softwareName'])) r = self.session.post(self.UPLOAD, data=json.dumps(msg), timeout=self.TIMEOUT) if __debug__ and r.status_code != requests.codes.ok: print('Status\t%s' % r.status_code) print('URL\t%s' % r.url) print('Headers\t%s' % r.headers) - print(('Content:\n%s' % r.text).encode('utf-8')) + print('Content:\n%s' % r.text) r.raise_for_status() def sendreplay(self):