diff --git a/osc/commandline.py b/osc/commandline.py index d88eebcb..fa9c3d5b 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6144,8 +6144,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. args = parseargs(args) pacs = [] - cp = conf.get_configParser(conf.config['conffile']) - apiurls = [i.rstrip('/') for i in cp.sections() if i != 'general'] + apiurls = conf.config['api_host_options'].keys() apiurl = '' for i in args: if is_project_dir(i): diff --git a/osc/core.py b/osc/core.py index 399a346a..33d32da7 100644 --- a/osc/core.py +++ b/osc/core.py @@ -476,6 +476,8 @@ class Project: 'no \'apiurl\' was passed to wc_repair' # hmm should we raise oscerr.WrongArgs? raise oscerr.WorkingCopyInconsistent(self.prjname, self.name, [], msg) + # sanity check + conf.parse_apisrv_url(None, apiurl) store_write_apiurl(self.dir, apiurl) self.apiurl = store_read_apiurl(self.dir, defaulturl=False) @@ -905,6 +907,8 @@ class Package: 'no \'apiurl\' was passed to wc_repair' # hmm should we raise oscerr.WrongArgs? raise oscerr.WorkingCopyInconsistent(self.prjname, self.name, [], msg) + # sanity check + conf.parse_apisrv_url(None, apiurl) store_write_apiurl(self.dir, apiurl) self.apiurl = store_read_apiurl(self.dir, defaulturl=False) # all files which are present in the filelist have to exist in the storedir