comparison scripts/imapServer.py @ 8528:fed0f839c260

fix: replace except: with except Exception: (by haosenwang1018@github) Remove bare 'except:' statements replace with 'except Exception'. In roundup_xmlrpc_server.py I changed Exception to BaseException so the database gets closed on signals as well. The rest of the changes do not look like they affect data integrity and are commited as supplied.
author John Rouillard <rouilj@ieee.org>
date Thu, 26 Feb 2026 09:46:02 -0500
parents b5fffd2a64af
children 9c3ec0a5c7fc
comparison
equal deleted inserted replaced
8527:d4a43d9da8ef 8528:fed0f839c260
223 self._getMessages(serv, nMessages, dbhome) 223 self._getMessages(serv, nMessages, dbhome)
224 serv.expunge() 224 serv.expunge()
225 225
226 # We are done with this mailbox 226 # We are done with this mailbox
227 serv.close() 227 serv.close()
228 except: 228 except Exception:
229 log.exception('Exception with server %s user %s', 229 log.exception('Exception with server %s user %s',
230 server, user) 230 server, user)
231 noErrors = False 231 noErrors = False
232 232
233 serv.logout() 233 serv.logout()
234 serv.shutdown() 234 serv.shutdown()
235 del serv 235 del serv
236 except: 236 except Exception:
237 log.exception('Exception while connecting to %s', server) 237 log.exception('Exception while connecting to %s', server)
238 noErrors = False 238 noErrors = False
239 return noErrors 239 return noErrors
240 240
241 241

Roundup Issue Tracker: http://roundup-tracker.org/