25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
|
diff -up system-config-printer-1.1.16/system-config-printer.py.select-nonexistent-printer system-config-printer-1.1.16/system-config-printer.py
|
||
|
--- system-config-printer-1.1.16/system-config-printer.py.select-nonexistent-printer 2010-01-06 15:46:02.056410131 +0000
|
||
|
+++ system-config-printer-1.1.16/system-config-printer.py 2010-01-06 15:46:54.226408979 +0000
|
||
|
@@ -6896,6 +6896,8 @@ class NewPrinterGUI(GtkGUI):
|
||
|
self.mainapp.cups.addPrinter(name, ppd=ppd)
|
||
|
except cups.IPPError, (e, msg):
|
||
|
self.show_IPP_Error(e, msg)
|
||
|
+ self.mainapp.cups._end_operation ()
|
||
|
+ return
|
||
|
|
||
|
self.mainapp.cups._end_operation ()
|
||
|
|
||
|
@@ -6923,6 +6925,11 @@ class NewPrinterGUI(GtkGUI):
|
||
|
|
||
|
iter = model.iter_next (iter)
|
||
|
|
||
|
+ if not self.printers.has_key (name):
|
||
|
+ # At this stage the printer has disappeared even though we
|
||
|
+ # only added it moments ago.
|
||
|
+ return
|
||
|
+
|
||
|
# Load information about the printer,
|
||
|
# e.g. self.mainapp.server_side_options and self.mainapp.ppd
|
||
|
# (both used below).
|