Exemplo n.º 1
0
    def register_scheme(self, scheme, cls):
        """
        It is possible to inject new schemes at runtime
        """
        if scheme in self._schemes:
            raise DuplicateScheme()

        urlparse.register_scheme(scheme)
        # TODO (vng): verify the interface of the new class
        self._schemes[scheme] = cls
Exemplo n.º 2
0
    def register_scheme(self, scheme, cls):
        """
        It is possible to inject new schemes at runtime
        """
        if scheme in self._schemes:
            raise DuplicateScheme()

        urlparse.register_scheme(scheme)
        # TODO (vng): verify the interface of the new class
        self._schemes[scheme] = cls
Exemplo n.º 3
0
 def register_scheme(self, scheme, cls):
     if scheme in self._schemes:
         raise DuplicateScheme()
     urlparse.register_scheme(scheme)
     self._schemes[scheme] = cls