diff options
author | Petr Šplíchal <psplicha@redhat.com> | 2012-02-16 13:18:45 +0100 |
---|---|---|
committer | Petr Šplíchal <psplicha@redhat.com> | 2012-02-29 11:27:44 +0100 |
commit | 4a90568a98a0698bb2cad57b8e17effb7abaa124 (patch) | |
tree | 526be4f94d1624d9b02eb35f3086daf17f85a302 | |
parent | 613c8a218195029fe96701042efceb90b4c34adf (diff) | |
download | python-nitrate-4a90568a98a0698bb2cad57b8e17effb7abaa124.tar.gz python-nitrate-4a90568a98a0698bb2cad57b8e17effb7abaa124.tar.xz python-nitrate-4a90568a98a0698bb2cad57b8e17effb7abaa124.zip |
New method clear() for cleaning containers
-rw-r--r-- | source/api.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/api.py b/source/api.py index c0792f5..7fbf1c7 100644 --- a/source/api.py +++ b/source/api.py @@ -1404,6 +1404,10 @@ class Container(Mutable): else: self._update() + def clear(self): + """ Remove all items from the container. """ + self.remove(list(self._items)) + def _add(self, items): """ Add provided items to the server. """ raise NitrateError("To be implemented by respective class.") |