diff --git a/osc/commandline.py b/osc/commandline.py index 72e18d56..4608dc9b 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1529,9 +1529,9 @@ class Osc(cmdln.Cmdln): if opts.force or not filelist or '_patchinfo' not in filelist: print("Creating new patchinfo...") - query = 'cmd=createpatchinfo&name=' + patchinfo + query = {"cmd": "createpatchinfo", "name": patchinfo} if opts.force: - query += "&force=1" + query["force"] = 1 url = makeurl(apiurl, ['source', project], query=query) f = http_POST(url) for p in meta_get_packagelist(apiurl, project): @@ -1539,7 +1539,7 @@ class Osc(cmdln.Cmdln): patchinfo = p else: print("Update existing _patchinfo file...") - query = 'cmd=updatepatchinfo' + query = {"cmd": "updatepatchinfo"} url = makeurl(apiurl, ['source', project, patchinfo], query=query) f = http_POST(url) diff --git a/osc/core.py b/osc/core.py index ba3525d5..321623dd 100644 --- a/osc/core.py +++ b/osc/core.py @@ -1521,12 +1521,12 @@ class Package: def delete_remote_source_file(self, n): """delete a remote source file (e.g. from the server)""" - query = 'rev=upload' + query = {"rev": "upload"} u = makeurl(self.apiurl, ['source', self.prjname, self.name, n], query=query) http_DELETE(u) def put_source_file(self, n, tdir, copy_only=False): - query = 'rev=repository' + query = {"rev": "repository"} tfilename = os.path.join(tdir, n) shutil.copyfile(os.path.join(self.dir, n), tfilename) # escaping '+' in the URL path (note: not in the URL query string) is