[rhythmbox] magnatune: convert the secret to a string
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] magnatune: convert the secret to a string
- Date: Sat, 11 Nov 2017 10:22:18 +0000 (UTC)
commit 288d68b06f4dacd979742cbc350d2311c6daa040
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat Nov 11 20:15:53 2017 +1000
magnatune: convert the secret to a string
https://bugzilla.gnome.org/show_bug.cgi?id=788676
plugins/magnatune/MagnatuneAccount.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/magnatune/MagnatuneAccount.py b/plugins/magnatune/MagnatuneAccount.py
index f36f242..2f0d7b0 100644
--- a/plugins/magnatune/MagnatuneAccount.py
+++ b/plugins/magnatune/MagnatuneAccount.py
@@ -76,7 +76,7 @@ class MagnatuneAccount(object):
# The Python API doesn't seem to have a way to differentiate between errors and no
results.
print ("Couldn't find an existing keyring entry")
return
- self.secret = items[0].get_secret().get()
+ self.secret = items[0].get_secret().get().decode("utf-8")
def get(self):
if self.secret is None:
@@ -84,7 +84,7 @@ class MagnatuneAccount(object):
account_type = self.settings['account-type']
try:
- (username, password) = self.secret.decode("utf-8").split("\n")
+ (username, password) = self.secret.split("\n")
return (account_type, username, password)
except ValueError:
return ('none', None, None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]