mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-31 20:26:13 +01:00
- only reparse the config if it was actually modified.
This commit is contained in:
parent
b2aceda67a
commit
f07da13359
@ -59,7 +59,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
return optparser
|
return optparser
|
||||||
|
|
||||||
|
|
||||||
def postoptparse(self):
|
def postoptparse(self, try_again = True):
|
||||||
"""merge commandline options into the config"""
|
"""merge commandline options into the config"""
|
||||||
try:
|
try:
|
||||||
conf.get_config(override_conffile = self.options.conffile,
|
conf.get_config(override_conffile = self.options.conffile,
|
||||||
@ -78,6 +78,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
conf.write_initial_config(e.file, config, True)
|
conf.write_initial_config(e.file, config, True)
|
||||||
print >>sys.stderr, 'done'
|
print >>sys.stderr, 'done'
|
||||||
|
if try_again: self.postoptparse(try_again = False)
|
||||||
except oscerr.ConfigMissingApiurl, e:
|
except oscerr.ConfigMissingApiurl, e:
|
||||||
print >>sys.stderr, e.msg
|
print >>sys.stderr, e.msg
|
||||||
import getpass
|
import getpass
|
||||||
@ -90,12 +91,7 @@ class Osc(cmdln.Cmdln):
|
|||||||
file = open(e.file, 'w')
|
file = open(e.file, 'w')
|
||||||
cp.write(file, True)
|
cp.write(file, True)
|
||||||
if file: file.close()
|
if file: file.close()
|
||||||
conf.get_config(override_conffile = self.options.conffile,
|
if try_again: self.postoptparse(try_again = False)
|
||||||
override_apisrv = self.options.apisrv,
|
|
||||||
override_debug = self.options.debug,
|
|
||||||
override_http_debug = self.options.http_debug,
|
|
||||||
override_traceback = self.options.traceback,
|
|
||||||
override_post_mortem = self.options.post_mortem)
|
|
||||||
|
|
||||||
self.conf = conf
|
self.conf = conf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user