summaryrefslogtreecommitdiff
path: root/sci-chemistry/modeller/files/modeller-10.5-fix-except.patch
blob: f480a8229bf9810ddb03b35edc3403a22b18f816 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/modlib/modeller/top_interpreter/__init__.py	2024-03-27 15:52:04.005550025 +0300
+++ b/modlib/modeller/top_interpreter/__init__.py	2024-03-27 15:54:00.776897686 +0300
@@ -65,7 +65,7 @@
             if len(line) > 0:
                 try:
                     self._parse_top_ini_line(line.split(None, 4), vars)
-                except TypeError, detail:  # noqa: E999
+                except (TypeError, detail):  # noqa: E999
                     mod_log_write("read_top__E> " + str(detail))
                     mod_log_write("             top.ini line: " + line)
                     raise
@@ -115,7 +115,7 @@
                 try:
                     fh = self._open_include_file(
                         self.variables['include_file'])
-                except IOError, detail:
+                except (IOError, detail):
                     mod_log_write("runlines__E> " + str(detail))
                     mod_log_write("             TOP Command line: " + line)
                     raise
@@ -162,7 +162,7 @@
                     indxca = self._run_top_cmd(cmd, indxca, lines, callstack,
                                                subrout)
                     _modeller.mod_top_post()
-            except (IndexError, SyntaxError, TypeError), detail:
+            except (IndexError, SyntaxError, TypeError, detail):
                 mod_log_write("runlines__E> " + str(detail))
                 mod_log_write("             TOP Command line: " + line)
                 raise