32 lines
1.3 KiB
Text
32 lines
1.3 KiB
Text
|
From Fedora:
|
||
|
python3 - recent HP release removed encoding/decoding to utf-8 in fax/pmlfax.py -
|
||
|
that results in text string going into translate function in base/utils.py, which
|
||
|
expects binary string because of parameters. Remove this patch if base/utils.py
|
||
|
code gets fixed.
|
||
|
|
||
|
Index: fax/pmlfax.py
|
||
|
--- fax/pmlfax.py.orig
|
||
|
+++ fax/pmlfax.py
|
||
|
@@ -145,8 +145,8 @@ class PMLFaxDevice(FaxDevice):
|
||
|
|
||
|
def getPhoneNum(self):
|
||
|
if PY3:
|
||
|
- data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
|
||
|
- return data
|
||
|
+ data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1].encode('utf-8'))
|
||
|
+ return data.decode('utf-8')
|
||
|
else:
|
||
|
return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
|
||
|
phone_num = property(getPhoneNum, setPhoneNum, doc="OID_FAX_LOCAL_PHONE_NUM")
|
||
|
@@ -157,8 +157,8 @@ class PMLFaxDevice(FaxDevice):
|
||
|
|
||
|
def getStationName(self):
|
||
|
if PY3:
|
||
|
- data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
|
||
|
- return data
|
||
|
+ data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1].encode('utf-8'))
|
||
|
+ return data.decode('utf-8')
|
||
|
else:
|
||
|
return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
|
||
|
|