Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 6014:6ed03d01491d
Bandit - ignore use of exec which re-raises exception
This code path is taken for python2 which is missing the
with_traceback to handle raising the outer exception from an inner
exception halder.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 31 Dec 2019 21:53:17 -0500 |
| parents | 54d0080769f9 |
| children | 380dec305c28 |
comparison
equal
deleted
inserted
replaced
| 6013:491fdb189a12 | 6014:6ed03d01491d |
|---|---|
| 1909 # receive a traceback, albeit with less information | 1909 # receive a traceback, albeit with less information |
| 1910 # than the one we tried to generate above. | 1910 # than the one we tried to generate above. |
| 1911 if sys.version_info[0] > 2: | 1911 if sys.version_info[0] > 2: |
| 1912 raise exc_info[0](exc_info[1]).with_traceback(exc_info[2]) | 1912 raise exc_info[0](exc_info[1]).with_traceback(exc_info[2]) |
| 1913 else: | 1913 else: |
| 1914 exec('raise exc_info[0], exc_info[1], exc_info[2]') | 1914 exec('raise exc_info[0], exc_info[1], exc_info[2]') # nosec |
| 1915 | 1915 |
| 1916 # these are the actions that are available | 1916 # these are the actions that are available |
| 1917 actions = ( | 1917 actions = ( |
| 1918 ('edit', actions.EditItemAction), | 1918 ('edit', actions.EditItemAction), |
| 1919 ('editcsv', actions.EditCSVAction), | 1919 ('editcsv', actions.EditCSVAction), |
