1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 18:26:15 +01:00

osc rm: ignore IOError with --force

This commit is contained in:
Michal Vyskocil 2010-03-22 11:07:10 +01:00
parent 09b48dd865
commit 13e03dd359

View File

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