Esempio n. 1
0
 def __init__(self, uri):
     object.__init__(self)
     if not cobra.isCobraUri(uri):
         raise ImportError
     try:
         self.cobra = cobra.CobraProxy(uri)
     except Exception, e:
         raise ImportError
Esempio n. 2
0
    def __init__(self, uri, retrymax=3, timeout=10):
        object.__init__(self)

        if not cobra.isCobraUri(uri):
            raise ImportError

        path = None
        if uri.find("|") != -1:
            uri,path = uri.split("|")
            path = [path,]

        self.uri = uri
        self.path = path

        try:
            self.cobra = cobra.CobraProxy(uri, retrymax=retrymax, timeout=timeout)
        except Exception, e:
            raise ImportError
Esempio n. 3
0
    def __init__(self, uri, retrymax=3, timeout=10):
        object.__init__(self)

        if not cobra.isCobraUri(uri):
            raise ImportError

        path = None
        if uri.find("|") != -1:
            uri, path = uri.split("|")
            path = [
                path,
            ]

        self.uri = uri
        self.path = path

        try:
            self.cobra = cobra.CobraProxy(uri,
                                          retrymax=retrymax,
                                          timeout=timeout)
        except Exception, e:
            raise ImportError