mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-28 02:36:15 +01:00
Merge pull request #1483 from dmach/makeurl-remove-string-queries
Remove remaining string queries from makeurl() calls
This commit is contained in:
commit
0f47ce90c5
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user