mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-27 07:06:13 +01:00
- handle error resulting from unexpected zero-length .osc/_files metadata
by raising oscerr.NoWorkingCopy()
This commit is contained in:
parent
06c2cbf882
commit
bce87c182d
@ -1267,7 +1267,13 @@ def findpacs(files):
|
||||
|
||||
|
||||
def read_filemeta(dir):
|
||||
return ET.parse(os.path.join(dir, store, '_files'))
|
||||
try:
|
||||
r = ET.parse(os.path.join(dir, store, '_files'))
|
||||
except SyntaxError, e:
|
||||
raise oscerr.NoWorkingCopy('\'%s\' is not a valid working copy.\n'
|
||||
'When parsing .osc/_files, the following error was encountered:\n'
|
||||
'%s' % (dir, e))
|
||||
return r
|
||||
|
||||
|
||||
def read_tobedeleted(dir):
|
||||
|
Loading…
Reference in New Issue
Block a user