dos2unix
[sfa.git] / geni / util / geniclient.py
index 35065d5..fb969f7 100644 (file)
@@ -23,10 +23,10 @@ class ServerException(Exception):
     pass
 
 class ExceptionUnmarshaller(xmlrpclib.Unmarshaller):
-    def close(self):\r
-        try:\r
-            return xmlrpclib.Unmarshaller.close(self)\r
-        except xmlrpclib.Fault, e:\r
+    def close(self):
+        try:
+            return xmlrpclib.Unmarshaller.close(self)
+        except xmlrpclib.Fault, e:
             raise ServerException(e.faultString)
 
 ##
@@ -37,35 +37,35 @@ class ExceptionUnmarshaller(xmlrpclib.Unmarshaller):
 class GeniTransport(xmlrpclib.Transport):
     key_file = None
     cert_file = None
-    def make_connection(self, host):\r
-        # create a HTTPS connection object from a host descriptor\r
-        # host may be a string, or a (host, x509-dict) tuple\r
-        import httplib\r
-        host, extra_headers, x509 = self.get_host_info(host)\r
-        try:\r
-            HTTPS = httplib.HTTPS()\r
-        except AttributeError:\r
-            raise NotImplementedError(\r
-                "your version of httplib doesn't support HTTPS"\r
-                )\r
-        else:\r
-            return httplib.HTTPS(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {}))\r
-\r
-    def getparser(self):\r
-        unmarshaller = ExceptionUnmarshaller()\r
-        parser = xmlrpclib.ExpatParser(unmarshaller)\r
-        return parser, unmarshaller\r
-\r
-##\r
-# The GeniClient class provides stubs for executing Geni operations. A given\r
-# client object connects to one server. To connect to multiple servers, create\r
-# multiple GeniClient objects.\r
-#\r
-# The Geni protocol uses an HTTPS connection, and the client's side of the\r
-# connection uses his private key. Generally, this private key must match the\r
-# public key that is containing in the GID that the client is providing for\r
-# those functions that take a GID.\r
-\r
+    def make_connection(self, host):
+        # create a HTTPS connection object from a host descriptor
+        # host may be a string, or a (host, x509-dict) tuple
+        import httplib
+        host, extra_headers, x509 = self.get_host_info(host)
+        try:
+            HTTPS = httplib.HTTPS()
+        except AttributeError:
+            raise NotImplementedError(
+                "your version of httplib doesn't support HTTPS"
+                )
+        else:
+            return httplib.HTTPS(host, None, key_file=self.key_file, cert_file=self.cert_file) #**(x509 or {}))
+
+    def getparser(self):
+        unmarshaller = ExceptionUnmarshaller()
+        parser = xmlrpclib.ExpatParser(unmarshaller)
+        return parser, unmarshaller
+
+##
+# The GeniClient class provides stubs for executing Geni operations. A given
+# client object connects to one server. To connect to multiple servers, create
+# multiple GeniClient objects.
+#
+# The Geni protocol uses an HTTPS connection, and the client's side of the
+# connection uses his private key. Generally, this private key must match the
+# public key that is containing in the GID that the client is providing for
+# those functions that take a GID.
+
 class GeniClient():
     ##
     # Create a new GeniClient object.