tjfontaine / airprint-generate

Automatically generate AirPrint Avahi service files for CUPS printers
http://www.atxconsulting.com/blog/tjfontaine/2010/11/21/automatically-generate-airprint-avahi-service-files-cups-printers
400 stars 119 forks source link

Fix opening the output file in either normal or binary mode #29

Open nolltre opened 3 years ago

nolltre commented 3 years ago

Fix the etree in Python lxml wanting to have the file opened in the 'wb' mode for the write() function to work. Fixes the 'TypeError: write() argument must be str, not bytes' error message but should retain compatibility if lxml would be missing. Closes issues #26 and #28