Skip to content

Commit

Permalink
Merge pull request #1686 from dmach/makeurl-query-dict
Browse files Browse the repository at this point in the history
Convert remaining makeurl() query parameters from deprecated string to dict
  • Loading branch information
dmach authored Jan 6, 2025
2 parents fb1e5a9 + eecab6e commit d2ed088
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@ def _check_service(root):
actionxml += s
xml = """<request> %s <state name="new"/> <description>%s</description> </request> """ % \
(actionxml, _html_escape(opts.message or ""))
u = makeurl(apiurl, ['request'], query='cmd=create&addrevision=1')
u = makeurl(apiurl, ['request'], query={"cmd": "create", "addrevision": "1"})
f = http_POST(u, data=xml)

root = ET.parse(f).getroot()
Expand Down Expand Up @@ -2240,7 +2240,7 @@ def _check_service(root):
rev = opts.revision
if not rev:
# get _link info from server, that knows about the local state ...
u = makeurl(apiurl, ['source', src_project, src_package], query="expand=1")
u = makeurl(apiurl, ['source', src_project, src_package], query={"expand": "1"})
f = http_GET(u)
root = ET.parse(f).getroot()
linkinfo = root.find('linkinfo')
Expand Down Expand Up @@ -2748,7 +2748,7 @@ def do_createrequest(self, subcmd, opts, *args):

xml = """<request> %s <state name="new"/> <description>%s</description> </request> """ % \
(actionsxml, _html_escape(opts.message or ""))
u = makeurl(apiurl, ['request'], query='cmd=create')
u = makeurl(apiurl, ['request'], query={"cmd": "create"})
f = http_POST(u, data=xml)

root = ET.parse(f).getroot()
Expand Down Expand Up @@ -9654,7 +9654,7 @@ def setBugownerHelper(apiurl, project, package, bugowner):

xml = """<request> %s <state name="new"/> <description>%s</description> </request> """ % \
(requestactionsxml, _html_escape(message or ""))
u = makeurl(apiurl, ['request'], query='cmd=create')
u = makeurl(apiurl, ['request'], query={"cmd": "create"})
f = http_POST(u, data=xml)

root = ET.parse(f).getroot()
Expand Down Expand Up @@ -10338,10 +10338,10 @@ def do_signkey(self, subcmd, opts, *args):
raise oscerr.WrongArgs('Please specify just the project')

if opts.create:
url = makeurl(apiurl, ['source', prj], query='cmd=createkey')
url = makeurl(apiurl, ['source', prj], query={"cmd": "createkey"})
f = http_POST(url)
elif opts.extend:
url = makeurl(apiurl, ['source', prj], query='cmd=extendkey')
url = makeurl(apiurl, ['source', prj], query={"cmd": "extendkey"})
f = http_POST(url)
elif opts.delete:
url = makeurl(apiurl, ['source', prj, "_pubkey"])
Expand Down

0 comments on commit d2ed088

Please sign in to comment.