1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 22:56:15 +01:00
github.com_openSUSE_osc/osc
Matthias Gerstner 0a99f35126
babysitter: fix RPMError fallback when running in Python3
After (successfully) running an 'osc vc' the following exception trace
comes up, when no rpm python module is available:

```
no changes made
Traceback (most recent call last):
  File "/home/mgerstner/.local/lib64/python3.6/site-packages/osc/babysitter.py", line 62, in run
    return prg.main(argv)
  File "/home/mgerstner/.local/lib64/python3.6/site-packages/osc/cmdln.py", line 344, in main
    return self.cmd(args)
  File "/home/mgerstner/.local/lib64/python3.6/site-packages/osc/cmdln.py", line 367, in cmd
    retval = self.onecmd(argv)
  File "/home/mgerstner/.local/lib64/python3.6/site-packages/osc/cmdln.py", line 501, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/home/mgerstner/.local/lib64/python3.6/site-packages/osc/cmdln.py", line 1232, in _dispatch_cmd
    return handler(argv[0], opts, *args)
  File "/home/mgerstner/.local/lib64/python3.6/site-packages/osc/commandline.py", line 8924, in do_vc
    sys.exit(vc.returncode)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mgerstner/bin/osc", line 41, in <module>
    r = babysitter.run(osccli)
  File "/home/mgerstner/.local/lib64/python3.6/site-packages/osc/babysitter.py", line 172, in run
    except RPMError as e:
TypeError: catching classes that do not inherit from BaseException is not allowed
```

To fix this change the fallback RPMError from None to an actual
Exception-derived type.
2019-07-25 10:58:56 +02:00
..
util add exception if encoding fails and try ISO-8859-1 2019-04-16 14:40:13 +02:00
__init__.py replace urlgrabber to enable python3 compatibility 2018-10-19 09:31:37 +02:00
.gitignore convert svn:ignore to gitignore 2009-12-03 19:19:53 +01:00
babysitter.py babysitter: fix RPMError fallback when running in Python3 2019-07-25 10:58:56 +02:00
build.py fix typo in last commit fixing simpleimage support 2019-06-27 16:34:41 +02:00
checker.py Resolve PEP8 issue W291 2014-08-12 15:01:16 +02:00
cmdln.py [python3] enable full python3 support for man 2018-12-13 13:33:51 +01:00
commandline.py Merge branch 'switch_diffs_to_bytes' of https://github.com/lethliel/osc 2019-07-24 14:45:23 +02:00
conf.py Consider the "realname" config option in apiurl sections 2018-08-17 22:45:17 +02:00
core.py open 0.166 development 2019-07-24 15:15:45 +02:00
fetch.py cast bytes object to string during os.path.join 2019-05-28 13:29:12 +02:00
grabber.py fix broken URLError handling in OscMirrorGroup.urlgrab() 2018-11-06 13:29:17 +01:00
meter.py Fix ZeroDivisionException in meter.PBTextMeter 2019-01-23 15:37:01 +01:00
OscConfigParser.py Fix Python 3.7 support 2018-11-06 10:35:38 +01:00
oscerr.py [python3] self[i] is now self.args[i] 2018-12-13 13:27:22 +01:00
oscssl.py fix oscssl.py not verifying TLS cert verification 2019-07-23 19:42:51 +02:00
oscsslexcp.py - remove shebang line to make rpmlint happy 2010-03-21 22:57:06 +01:00