pvl.hosts.HostError: explicitly doc that host:Host
authorTero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 15:22:30 +0200
changeset 485 f0e09ec434e9
parent 484 099dee149e74
child 486 cf120b977790
pvl.hosts.HostError: explicitly doc that host:Host
pvl/hosts/host.py
--- a/pvl/hosts/host.py	Thu Feb 26 15:09:16 2015 +0200
+++ b/pvl/hosts/host.py	Thu Feb 26 15:22:30 2015 +0200
@@ -4,12 +4,20 @@
 import pvl.dns
 
 class HostError (Exception):
-    def __init__(self, name, error):
-        self.name = name
+    """
+        An error associated with some specific Host.
+    """
+
+    def __init__(self, host, error):
+        """
+            host    : Host which caused error
+            error   : Exception or str message
+        """
+        self.host = host
         self.error = error
 
     def __str__ (self):
-        return "{self.name}: {self.error}".format(self=self)        
+        return "{self.host}: {self.error}".format(self=self)
 
 def parse_bool(value):
     """