From 13e03dd359f60c3db87b2b1b1e1a01782a201bb2 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Mon, 22 Mar 2010 11:07:10 +0100 Subject: [PATCH] osc rm: ignore IOError with --force --- osc/core.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)