mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-07 21:58:41 +02:00
- fixed #704939 ("osc dies when the config file is supplied via STDIN")
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user