Bug ID: 1166537 Summary: osc rq accept - forwarding request causes backtrace Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: firstname.lastname@example.org Reporter: email@example.com QA Contact: firstname.lastname@example.org CC: email@example.com Found By: --- Blocker: ---
When accepting a SR to a devel project, osc asks if I want to forward the SR to Factory. I answered "y", but got this nice backtrace instead of a SR to Factory:
# osc rq accept 784420 Result of change request state: ok openSUSE:Factory Forward this submit to it? ([y]/n)y Traceback (most recent call last): File "/usr/bin/osc", line 41, in <module> r = babysitter.run(osccli) File "/usr/lib/python3.8/site-packages/osc/babysitter.py", line 64, in run return prg.main(argv) File "/usr/lib/python3.8/site-packages/osc/cmdln.py", line 344, in main return self.cmd(args) File "/usr/lib/python3.8/site-packages/osc/cmdln.py", line 367, in cmd retval = self.onecmd(argv) File "/usr/lib/python3.8/site-packages/osc/cmdln.py", line 501, in onecmd return self._dispatch_cmd(handler, argv) File "/usr/lib/python3.8/site-packages/osc/cmdln.py", line 1232, in _dispatch_cmd return handler(argv, opts, *args) File "/usr/lib/python3.8/site-packages/osc/commandline.py", line 2652, in do_request project, package, html.escape(msg, quote=False)) NameError: name 'html' is not defined
Wild guess: missing "import html"?
Note: commandline.py has an "import html" in do_submitrequest(), but this import isn't visible to do_request(). Also note that there are more functions in this file that call html.escape() without importing html before and will probably break in a similar way. Doing the "import html" in the file header instead of inside the functions might be a good idea.