1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-23 14:48:53 +02:00

store commit message so it doesn't get lost on failure

This commit is contained in:
Ludwig Nussel
2010-02-11 11:25:56 +01:00
parent 0b1e0b89ea
commit cb5ac5af3e
2 changed files with 23 additions and 3 deletions

View File

@@ -3943,6 +3943,17 @@ def store_write_apiurl(dir, apiurl):
fname = os.path.join(dir, store, '_apiurl')
open(fname, 'w').write(apiurl + '\n')
def store_unlink_file(dir, file):
try: os.unlink(os.path.join(dir, store, file))
except: pass
def store_read_file(dir, file):
try:
content = open(os.path.join(dir, store, file)).read()
return content
except:
return None
def store_write_initial_packages(dir, project, subelements):
fname = os.path.join(dir, store, '_packages')
root = ET.Element('project', name=project)