Skip to content

Commit 287b8f6

Browse files
committed
fixes wraith-wireless#36 by doing byte/string conversion wraith-wireless#53
1 parent 2e2e1f0 commit 287b8f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pyric/utils/rfkill.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def rfkill_unblock(idx):
131131
fout = None
132132
try:
133133
rfke = rfkh.rfkill_event(idx,rfkh.RFKILL_TYPE_ALL,rfkh.RFKILL_OP_CHANGE,0,0)
134+
if _PY3_: rfke = rfke.decode('ascii')
134135
fout = open(dpath, 'w')
135136
fout.write(rfke)
136137
except struct.error as e:
@@ -231,4 +232,4 @@ def gettype(idx):
231232
except IOError:
232233
raise pyric.error(errno.ENODEV,"No device at {0}".format(idx))
233234
finally:
234-
if fin: fin.close()
235+
if fin: fin.close()

0 commit comments

Comments
 (0)