Permalink
Browse files

Fixed issue #10 - Error when installing printer with non ASCII charac…

…ters
  • Loading branch information...
simoncadman committed Aug 5, 2012
1 parent f2ae3fd commit e7e55fd83156780c67ba7a4b7d435665e474816c
Showing with 2 additions and 2 deletions.
  1. +2 −2 setupcloudprint.py
View
@@ -60,14 +60,14 @@
printeruris = []
for printer in printers:
- uri = Printer.printerNameToUri(printer['name'])
+ uri = Printer.printerNameToUri(printer['name'].encode('ascii', 'ignore'))
found = False
printeruris.append(uri)
for cupsprinter in cupsprinters:
if cupsprinters[cupsprinter]['device-uri'] == uri:
found = True
if found == False:
- Printer.AddPrinter(prefix + printer['name'], uri, connection)
+ Printer.AddPrinter(prefix + printer['name'].encode('ascii', 'ignore'), uri, connection)
addedCount+=1
if addedCount > 0:

0 comments on commit e7e55fd

Please sign in to comment.