1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 10:46:15 +01:00
github.com_openSUSE_osc/osc
Marcus Huewe 0926e37f1e Do not return Request instances in Osc._submit_request
If there are existing requests that should be superseded, the old
code stores the Request instances in the myreqs list, which is
returned to the caller. However, the caller expects only request
ids instead of instances of class Request. Eventually, this results
in a type error - excerpt:

...
  File "/usr/lib/python3.8/site-packages/osc/commandline.py", line 1892, in do_createrequest
    change_request_state(apiurl, srid, 'superseded',
  File "/usr/lib/python3.8/site-packages/osc/core.py", line 4322, in change_request_state
    u = makeurl(apiurl,
  File "/usr/lib/python3.8/site-packages/osc/core.py", line 3326, in makeurl
    return urlunsplit((scheme, netloc, '/'.join([path] + list(l)), query, ''))
TypeError: sequence item 2: expected str instance, Request found

Hence, simply return the request ids instead of the Request instances.

Note: this changes the API of the Osc._submit_request method but
this is OK because it is not part of the public API.
2020-12-22 16:04:13 +01:00
..
util Use os.getcwdb() instead of os.getcwd().encode() in util.cpio.CpioRead 2020-11-22 17:39:54 +01: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 Ignore signal.SIGWINCH. 2020-08-27 16:56:36 +02:00
build.py Add support for nspawn VM type. 2020-11-22 14:34:37 +00:00
checker.py Resolve PEP8 issue W291 2014-08-12 15:01:16 +02:00
cmdln.py add regex for python3 missing arguments err 2020-05-18 19:46:22 +02:00
commandline.py Do not return Request instances in Osc._submit_request 2020-12-22 16:04:13 +01:00
conf.py Add ccache argument for oscrc 2020-04-14 14:50:24 +10:00
core.py Avoid superfluous/excessive usage of _html_escape 2020-11-28 18:03:24 +01:00
credentials.py fix list of backends for old python-keyring 2020-02-14 09:35:07 +01:00
fetch.py Fix a potential TypeError in CpioRead.copyin and CpioRead.copyin_file 2020-11-20 09:55:09 +01: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 Rename SafeConfigParser to ConfigParser 2020-02-07 12:04:49 +01:00
oscerr.py Improve password handling 2019-08-29 16:11:17 +02:00
oscssl.py Use correct appname for trusted-certs store 2019-07-28 14:59:14 +02:00
oscsslexcp.py - remove shebang line to make rpmlint happy 2010-03-21 22:57:06 +01:00