we dont need no steenking accessor functions.
authorsalimfadhley <sal@stodge.org>
Mon, 17 Jun 2013 22:44:45 +0000 (23:44 +0100)
committerSalim Fadhley <sal@stodge.org>
Sun, 23 Jun 2013 20:21:51 +0000 (21:21 +0100)
jenkinsapi/node.py

index 5fcb6a4..59555f3 100644 (file)
@@ -27,9 +27,6 @@ class Node(JenkinsBase):
     def __str__(self):
         return self.name
 
-    def get_node_data(self):
-        return self._data
-
     def is_online(self):
         self.poll()
         return not self._data['offline']
@@ -46,25 +43,25 @@ class Node(JenkinsBase):
 
 
     def set_online(self):
-        """ 
+        """
         Set node online.
-        Before change state verify client state: if node set 'offline' but 'temporarilyOffline' 
+        Before change state verify client state: if node set 'offline' but 'temporarilyOffline'
         is not set - client has connection problems and AssertionError raised.
         If after run node state has not been changed raise AssertionError.
         """
         self.poll()
         # Before change state check if client is connected
         if self._data['offline'] and not self._data['temporarilyOffline']:
-            raise AssertionError("Node is offline and not marked as temporarilyOffline" + 
-                                 ", check client connection: " + 
-                                 "offline = %s , temporarilyOffline = %s" % 
+            raise AssertionError("Node is offline and not marked as temporarilyOffline" +
+                                 ", check client connection: " +
+                                 "offline = %s , temporarilyOffline = %s" %
                                 (self._data['offline'], self._data['temporarilyOffline']))
         elif self._data['offline'] and self._data['temporarilyOffline']:
             self.toggle_temporarily_offline()
             self.poll()
             if self._data['offline']:
-                raise AssertionError("The node state is still offline, check client connection:" + 
-                                     " offline = %s , temporarilyOffline = %s" % 
+                raise AssertionError("The node state is still offline, check client connection:" +
+                                     " offline = %s , temporarilyOffline = %s" %
                                      (self._data['offline'], self._data['temporarilyOffline']))
 
     def set_offline(self, message="requested from jenkinsapi"):
@@ -78,8 +75,8 @@ class Node(JenkinsBase):
             self.toggle_temporarily_offline(message)
             self.poll()
             if not self._data['offline']:
-                raise AssertionError("The node state is still online:" + 
-                                     "offline = %s , temporarilyOffline = %s" % 
+                raise AssertionError("The node state is still online:" +
+                                     "offline = %s , temporarilyOffline = %s" %
                                      (self._data['offline'], self._data['temporarilyOffline']))
 
     def toggle_temporarily_offline(self, message="requested from jenkinsapi"):