1
diff -Nur -x '*.orig' -x '*~' system-config-printer-1.3.1+20110222//system-config-printer.py system-config-printer-1.3.1+20110222.new//system-config-printer.py
2
--- system-config-printer-1.3.1+20110222//system-config-printer.py 2011-02-17 17:36:00.000000000 +0100
3
+++ system-config-printer-1.3.1+20110222.new//system-config-printer.py 2011-03-09 21:39:19.150627801 +0100
6
def cups_connection_error (self, mon):
9
+ prompt_allowed = self.cups._get_prompt_allowed ()
10
+ self.cups._set_prompt_allowed (False)
12
+ # With this loop we wait for up to 30 secs whether the CUPS daemon
13
+ # comes back listening. To check whether the daemon is listening,
14
+ # we try to connect (without dropping any existing connection).
15
+ # If the the connection errors, the daemon is not back and we wait
16
+ # 1 sec, if it works, we disconnect the extra connection and
17
+ # break out of the wait loop.
18
+ for i in range (30):
20
+ connection = cups.Connection (host=self.connect_server,
21
+ encryption=self.connect_encrypt)
26
+ debugprint("Retrying to connect to CUPS in 1 sec ...")
29
self.cups.getClasses ()
30
+ self.cups._set_prompt_allowed (prompt_allowed)