mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-23 02:32:13 +01:00
- wc_repair: check if passed apiurl is valid
- do_repairwc: get apiurls from conf.config.api_host_options dict
This commit is contained in:
parent
71bedd4bb1
commit
de25822a33
@ -6144,8 +6144,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
|
|
||||||
args = parseargs(args)
|
args = parseargs(args)
|
||||||
pacs = []
|
pacs = []
|
||||||
cp = conf.get_configParser(conf.config['conffile'])
|
apiurls = conf.config['api_host_options'].keys()
|
||||||
apiurls = [i.rstrip('/') for i in cp.sections() if i != 'general']
|
|
||||||
apiurl = ''
|
apiurl = ''
|
||||||
for i in args:
|
for i in args:
|
||||||
if is_project_dir(i):
|
if is_project_dir(i):
|
||||||
|
@ -476,6 +476,8 @@ class Project:
|
|||||||
'no \'apiurl\' was passed to wc_repair'
|
'no \'apiurl\' was passed to wc_repair'
|
||||||
# hmm should we raise oscerr.WrongArgs?
|
# hmm should we raise oscerr.WrongArgs?
|
||||||
raise oscerr.WorkingCopyInconsistent(self.prjname, self.name, [], msg)
|
raise oscerr.WorkingCopyInconsistent(self.prjname, self.name, [], msg)
|
||||||
|
# sanity check
|
||||||
|
conf.parse_apisrv_url(None, apiurl)
|
||||||
store_write_apiurl(self.dir, apiurl)
|
store_write_apiurl(self.dir, apiurl)
|
||||||
self.apiurl = store_read_apiurl(self.dir, defaulturl=False)
|
self.apiurl = store_read_apiurl(self.dir, defaulturl=False)
|
||||||
|
|
||||||
@ -905,6 +907,8 @@ class Package:
|
|||||||
'no \'apiurl\' was passed to wc_repair'
|
'no \'apiurl\' was passed to wc_repair'
|
||||||
# hmm should we raise oscerr.WrongArgs?
|
# hmm should we raise oscerr.WrongArgs?
|
||||||
raise oscerr.WorkingCopyInconsistent(self.prjname, self.name, [], msg)
|
raise oscerr.WorkingCopyInconsistent(self.prjname, self.name, [], msg)
|
||||||
|
# sanity check
|
||||||
|
conf.parse_apisrv_url(None, apiurl)
|
||||||
store_write_apiurl(self.dir, apiurl)
|
store_write_apiurl(self.dir, apiurl)
|
||||||
self.apiurl = store_read_apiurl(self.dir, defaulturl=False)
|
self.apiurl = store_read_apiurl(self.dir, defaulturl=False)
|
||||||
# all files which are present in the filelist have to exist in the storedir
|
# all files which are present in the filelist have to exist in the storedir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user