]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
python: get_keys() doesn't require a path
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 7 Dec 2012 20:47:10 +0000 (15:47 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 10 Dec 2012 14:26:03 +0000 (09:26 -0500)
The python binding was forcing the user to pass a base path to
get_keys() even though the C binding doesn't require it.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/python-lxc/lxc/__init__.py.in

index f42b9447e1917a67eab604f9da88b4e7243380a6..9ef3459f192339c4df2a8f908dd3c0a09362124c 100644 (file)
@@ -400,11 +400,14 @@ class Container(_lxc.Container):
         os.remove(path)
         return ips
 
-    def get_keys(self, key):
+    def get_keys(self, key=None):
         """
             Returns a list of valid sub-keys.
         """
-        value = _lxc.Container.get_keys(self, key)
+        if key:
+            value = _lxc.Container.get_keys(self, key)
+        else:
+            value = _lxc.Container.get_keys(self)
 
         if value is False:
             return False