Skip to content

Instantly share code, notes, and snippets.

@leshikus
Created April 12, 2014 13:44
Show Gist options
  • Save leshikus/10536522 to your computer and use it in GitHub Desktop.
Save leshikus/10536522 to your computer and use it in GitHub Desktop.
hplip fix for russian scanners
--- device.py.orig 2014-04-12 17:23:12.447041684 +0400
+++ /usr/share/hplip/base/device.py 2014-04-12 17:18:23.513041337 +0400
@@ -2523,6 +2523,7 @@
if not data:
log.error("Unable To read the XML data from device")
return ""
+ data = filter(lambda x: x in string.printable, data)
xmlDict = utils.XMLToDictParser().parseXML(data)
try:
return str(xmlDict[attribute])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment