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:
11
osc/core.py
11
osc/core.py
@@ -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)
|
||||
|
Reference in New Issue
Block a user