mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-16 02:26:13 +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:
|
if opts.force or not filelist or '_patchinfo' not in filelist:
|
||||||
print("Creating new patchinfo...")
|
print("Creating new patchinfo...")
|
||||||
query = 'cmd=createpatchinfo&name=' + patchinfo
|
query = {"cmd": "createpatchinfo", "name": patchinfo}
|
||||||
if opts.force:
|
if opts.force:
|
||||||
query += "&force=1"
|
query["force"] = 1
|
||||||
url = makeurl(apiurl, ['source', project], query=query)
|
url = makeurl(apiurl, ['source', project], query=query)
|
||||||
f = http_POST(url)
|
f = http_POST(url)
|
||||||
for p in meta_get_packagelist(apiurl, project):
|
for p in meta_get_packagelist(apiurl, project):
|
||||||
@ -1539,7 +1539,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
patchinfo = p
|
patchinfo = p
|
||||||
else:
|
else:
|
||||||
print("Update existing _patchinfo file...")
|
print("Update existing _patchinfo file...")
|
||||||
query = 'cmd=updatepatchinfo'
|
query = {"cmd": "updatepatchinfo"}
|
||||||
url = makeurl(apiurl, ['source', project, patchinfo], query=query)
|
url = makeurl(apiurl, ['source', project, patchinfo], query=query)
|
||||||
f = http_POST(url)
|
f = http_POST(url)
|
||||||
|
|
||||||
|
@ -1521,12 +1521,12 @@ class Package:
|
|||||||
|
|
||||||
def delete_remote_source_file(self, n):
|
def delete_remote_source_file(self, n):
|
||||||
"""delete a remote source file (e.g. from the server)"""
|
"""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)
|
u = makeurl(self.apiurl, ['source', self.prjname, self.name, n], query=query)
|
||||||
http_DELETE(u)
|
http_DELETE(u)
|
||||||
|
|
||||||
def put_source_file(self, n, tdir, copy_only=False):
|
def put_source_file(self, n, tdir, copy_only=False):
|
||||||
query = 'rev=repository'
|
query = {"rev": "repository"}
|
||||||
tfilename = os.path.join(tdir, n)
|
tfilename = os.path.join(tdir, n)
|
||||||
shutil.copyfile(os.path.join(self.dir, n), tfilename)
|
shutil.copyfile(os.path.join(self.dir, n), tfilename)
|
||||||
# escaping '+' in the URL path (note: not in the URL query string) is
|
# escaping '+' in the URL path (note: not in the URL query string) is
|
||||||
|
Loading…
Reference in New Issue
Block a user