[Spambayes-checkins] spambayes/windows pop3proxy_tray.py,1.10,1.11

Mark Hammond mhammond at users.sourceforge.net
Mon Sep 15 00:48:52 EDT 2003


Update of /cvsroot/spambayes/spambayes/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv15225

Modified Files:
	pop3proxy_tray.py 
Log Message:
If there was an error shutting down the proxy, just log it and continue
to exit.  The error I saw was when it got confused and wasn't even 
running, so got a "connection refused" error.
Don't terminate the GUI process via sys.exit - use PostQuitMessage instead.


Index: pop3proxy_tray.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/windows/pop3proxy_tray.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pop3proxy_tray.py	15 Sep 2003 02:15:45 -0000	1.10
--- pop3proxy_tray.py	15 Sep 2003 04:48:50 -0000	1.11
***************
*** 358,365 ****
      def OnExit(self):
          if self.started and not self.use_service:
!             sb_server.stop(sb_server.state)
              self.started = False
          DestroyWindow(self.hwnd)
!         sys.exit()
          
      def StartProxyThread(self):
--- 358,371 ----
      def OnExit(self):
          if self.started and not self.use_service:
!             try:
!                 sb_server.stop(sb_server.state)
!             except:
!                 print "Error stopping proxy at shutdown"
!                 traceback.print_exc()
!                 print "Shutting down anyway..."
! 
              self.started = False
          DestroyWindow(self.hwnd)
!         PostQuitMessage(0)
          
      def StartProxyThread(self):





More information about the Spambayes-checkins mailing list