From: David Howells Date: Fri, 11 Apr 2014 12:27:30 +0000 (+0100) Subject: Allow the volserver class to be instantiated with an int address X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8c8c01d83bbeb7ffdf1da8a91e8e18f2fefa9400;p=users%2Fdhowells%2Fkafs-utils.git Allow the volserver class to be instantiated with an int address Allow the volserver class to be instantiated with an int address that represents a binary coded IPv4 address. Signed-off-by: David Howells --- diff --git a/suite/lib/volserver.py b/suite/lib/volserver.py index 6584efa..a35c963 100644 --- a/suite/lib/volserver.py +++ b/suite/lib/volserver.py @@ -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)) == "": + name = addrcache.int2addr(name) debug("New VolServer", name) self.__name = name self.__looked_up = False