diff -r 85df38eb4012 -r df88fead2976 buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py --- a/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py Tue Apr 27 08:33:08 2010 +0300 +++ b/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py Thu Jul 22 17:08:43 2010 +0300 @@ -1201,7 +1201,7 @@ result = self._session.execute("finduse \"%s\"" % self, FinduseResult(self)) return result.output - def delete(self, recurse=False): + def delete(self, recurse=False, scope=None): """ Delete a synergy project. """ args = "" if recurse: @@ -1209,8 +1209,10 @@ parg = "" if self.type == "project": parg = "-project" + if scope: + args = args + ' -scope "' + scope + '"' result = self._session.execute("delete %s %s \"%s\"" % (args, parg, self)) - if result.status != 0 and result.status != None: + if (result.status != 0 and result.status != None) or (result.output.strip().startswith('Cannot use')): raise CCMException("An error occurred while deleting object %s (error status: %s)\n%s" % (self, result.status, result.output), result) return result