diff --git a/osc/core.py b/osc/core.py index 0f1d2899..8dd2dfae 100644 --- a/osc/core.py +++ b/osc/core.py @@ -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)