Mercurial > p > roundup > code
comparison roundup/cgi/TAL/DummyEngine.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 | d26921b851c3 |
| children |
comparison
equal
deleted
inserted
replaced
| 8527:d4a43d9da8ef | 8528:fed0f839c260 |
|---|---|
| 116 if type == "exists": | 116 if type == "exists": |
| 117 return expr in self.locals or expr in self.globals | 117 return expr in self.locals or expr in self.globals |
| 118 if type == "python": | 118 if type == "python": |
| 119 try: | 119 try: |
| 120 return eval(expr, self.globals, self.locals) | 120 return eval(expr, self.globals, self.locals) |
| 121 except: | 121 except Exception: |
| 122 raise TALESError("evaluation error in %s" % repr(expr)) | 122 raise TALESError("evaluation error in %s" % repr(expr)) |
| 123 if type == "position": | 123 if type == "position": |
| 124 # Insert the current source file name, line number, | 124 # Insert the current source file name, line number, |
| 125 # and column offset. | 125 # and column offset. |
| 126 if self.position: | 126 if self.position: |
