]> www.infradead.org Git - users/dhowells/kafs-utils.git/commitdiff
Allow the volserver class to be instantiated with an int address
authorDavid Howells <dhowells@redhat.com>
Fri, 11 Apr 2014 12:27:30 +0000 (13:27 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 11 Apr 2014 12:27:30 +0000 (13:27 +0100)
Allow the volserver class to be instantiated with an int address that
represents a binary coded IPv4 address.

Signed-off-by: David Howells <dhowells@redhat.com>
suite/lib/volserver.py

index 6584efa904bd89ac08626e65fc983255a1cfd20b..a35c963b98983fb686d36542cc3800f491ad9983 100644 (file)
@@ -32,6 +32,8 @@ class VolServerError(exception.AFSException):
 class volserver:
     """Represents an AFS Volume server.  We hold the server address here."""
     def __init__(self, name):
+        if str(type(name)) == "<class 'int'>":
+            name = addrcache.int2addr(name)
         debug("New VolServer", name)
         self.__name = name
         self.__looked_up = False