Convert dbus.String
into python strings when importing config from keyring
#1887
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Hello,
Current keyring configuration source doesn't really work - it fails with
TypeError: string argument without an encoding
whenever there is something mopidy-related in the keyring.dbus
package returns strings asdbus.String
types that can't be byte-encoded without passingencoding
explicitly. Moreover, the rest of the code doesn't really expect bytes there - it wants strings (otherwise it will not find the key in dictionary, sinceb'section' != 'section'
). This PR converts the DBus attribute name/value pairs tostring
s explicitly and therefore fixes theTypeError: string argument without an encoding
error.