diff --git a/storage/swift.py b/storage/swift.py index 355c04034..d8264b936 100644 --- a/storage/swift.py +++ b/storage/swift.py @@ -206,7 +206,6 @@ class SwiftStorage(BaseStorage): try: self._get_connection().delete_object(self._swift_container, path) except Exception: - logger.exception('Could not delete path %s', path) raise IOError('Cannot delete path: %s' % path) def _random_checksum(self, count): diff --git a/test/test_swift.py b/test/test_swift.py index 3d7769671..9953a70c7 100644 --- a/test/test_swift.py +++ b/test/test_swift.py @@ -39,6 +39,11 @@ class MockSwiftTests(unittest.TestCase): swift.exists('object/path') swift._get_connection().head_object.assert_called_with('container-name', 'basepathobject/path') + def test_delete_unknown_path(self): + swift = SwiftStorage(**self.base_args) + with self.assertRaises(IOError): + swift.remove('someunknownpath') + class FakeSwiftStorage(SwiftStorage): def __init__(self, *args, **kwargs):