1
0
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:
Marcus Huewe 2011-11-18 22:32:10 +01:00
parent 18ad5fcd5a
commit 8971959187

View File

@ -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: