mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-28 10:46:15 +01:00
osc rm: ignore IOError with --force
This commit is contained in:
parent
09b48dd865
commit
13e03dd359
@ -723,7 +723,12 @@ class Package:
|
||||
|
||||
def delete_file(self, n, force=False):
|
||||
"""deletes a file if possible and marks the file as deleted"""
|
||||
state = self.status(n)
|
||||
state = '?'
|
||||
try:
|
||||
state = self.status(n)
|
||||
except IOError, ioe:
|
||||
if not force:
|
||||
raise ioe
|
||||
if state in ['?', 'A', 'M'] and not force:
|
||||
return (False, state)
|
||||
self.delete_localfile(n)
|
||||
|
Loading…
Reference in New Issue
Block a user