# HG changeset patch # User Goffi # Date 1571207992 -7200 # Node ID f91d0e6d9b1399ef5483aa1679024c46480f2e69 # Parent 49c7bc3afb2b4069961261b2fd74b9ed33b06134 plugin android: fixed encoding in states after Python 3 port diff -r 49c7bc3afb2b -r f91d0e6d9b13 sat/plugins/plugin_misc_android.py --- a/sat/plugins/plugin_misc_android.py Wed Oct 16 08:39:35 2019 +0200 +++ b/sat/plugins/plugin_misc_android.py Wed Oct 16 08:39:52 2019 +0200 @@ -63,9 +63,9 @@ PARAM_VIBRATE_LABEL = D_("Vibrate on notifications") SOCKET_DIR = "/data/data/org.salutatoi.cagou/" SOCKET_FILE = ".socket" -STATE_RUNNING = "running" -STATE_PAUSED = "paused" -STATE_STOPPED = "stopped" +STATE_RUNNING = b"running" +STATE_PAUSED = b"paused" +STATE_STOPPED = b"stopped" STATES = (STATE_RUNNING, STATE_PAUSED, STATE_STOPPED) NET_TYPE_NONE = "no network" NET_TYPE_WIFI = "wifi" @@ -198,7 +198,7 @@ @state.setter def state(self, new_state): - log.debug("frontend state has changed: {state}".format(state=new_state)) + log.debug(f"frontend state has changed: {new_state.decode()}") previous_state = self._state self._state = new_state if new_state == STATE_RUNNING: