system-config-printer/system-config-printer-check-still-connecting.patch

25 lines
1.1 KiB
Diff

diff -up system-config-printer-1.1.16/monitor.py.check-still-connecting system-config-printer-1.1.16/monitor.py
--- system-config-printer-1.1.16/monitor.py.check-still-connecting 2009-12-22 14:44:19.000000000 +0000
+++ system-config-printer-1.1.16/monitor.py 2010-01-18 16:31:05.664560326 +0000
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-## Copyright (C) 2007, 2008, 2009 Tim Waugh <twaugh@redhat.com>
-## Copyright (C) 2007, 2008, 2009 Red Hat, Inc.
+## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc.
+## Author: Tim Waugh <twaugh@redhat.com>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -208,7 +208,9 @@ class Monitor:
self.connecting_timers[printer] = timer
return False
- del self.connecting_timers[printer]
+ if self.connecting_timers.has_key (printer):
+ del self.connecting_timers[printer]
+
debugprint ("Still-connecting timer fired for `%s'" % printer)
(printer_jobs, my_printers) = self.sort_jobs_by_printer ()
self.update_connecting_devices (printer_jobs)