Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert dbus.String into python strings when importing config from keyring #1887

merged 1 commit into from Mar 17, 2020


Copy link

@jakubfijalkowski jakubfijalkowski commented Mar 15, 2020


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 as dbus.String types that can't be byte-encoded without passing encoding 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, since b'section' != 'section'). This PR converts the DBus attribute name/value pairs to strings explicitly and therefore fixes the TypeError: string argument without an encoding error.

Copy link

@codecov codecov bot commented Mar 15, 2020

Codecov Report

Merging #1887 into develop will not change coverage by %.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1887   +/-   ##
  Coverage    76.89%   76.89%           
  Files           55       55           
  Lines         4666     4666           
  Hits          3588     3588           
  Misses        1078     1078           
Impacted Files Coverage Δ
mopidy/config/ 17.34% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c6125d...86e96aa. Read the comment docs.

@jodal jodal added this to the v3.0.2 milestone Mar 16, 2020
jodal approved these changes Mar 16, 2020
Copy link

@jodal jodal left a comment

The keyring part isn't the most well-maintained part of Mopidy :-/

This looks good to me.

@jodal jodal merged commit 4c63eea into mopidy:develop Mar 17, 2020
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants