mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
- fixed #704939 ("osc dies when the config file is supplied via STDIN")
This commit is contained in:
parent
18ad5fcd5a
commit
8971959187
@ -563,6 +563,9 @@ def get_configParser(conffile=None, force_read=False):
|
||||
|
||||
def write_config(fname, cp):
|
||||
"""write new configfile in a safe way"""
|
||||
if os.path.exists(fname) and not os.path.isfile(fname):
|
||||
# only write to a regular file
|
||||
return
|
||||
with open(fname + '.new', 'w') as f:
|
||||
cp.write(f, comments=True)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user