MCPcopy Index your code
hub / github.com/python/cpython / add_password

Method add_password

Lib/urllib/request.py:810–819  ·  view source on GitHub ↗
(self, realm, uri, user, passwd)

Source from the content-addressed store, hash-verified

808 self.passwd = {}
809
810 def add_password(self, realm, uri, user, passwd):
811 # uri could be a single URI or a sequence
812 if isinstance(uri, str):
813 uri = [uri]
814 if realm not in self.passwd:
815 self.passwd[realm] = {}
816 for default_port in True, False:
817 reduced_uri = tuple(
818 self.reduce_uri(u, default_port) for u in uri)
819 self.passwd[realm][reduced_uri] = (user, passwd)
820
821 def find_user_password(self, realm, authuri):
822 domains = self.passwd.get(realm, {})

Callers 1

add_passwordMethod · 0.45

Calls 1

reduce_uriMethod · 0.95

Tested by

no test coverage detected