fixed error in assertion text
[p2pool.git] / SOAPpy / URLopener.py
1 """Provide a class for loading data from URL's that handles basic
2 authentication"""
3
4 ident = '$Id: URLopener.py 541 2004-01-31 04:20:06Z warnes $'
5 from version import __version__
6
7 from Config import Config
8 from urllib import FancyURLopener
9
10 class URLopener(FancyURLopener):
11
12     username = None
13     passwd = None
14
15
16     def __init__(self, username=None, passwd=None, *args, **kw):
17         FancyURLopener.__init__( self, *args, **kw)
18         self.username = username
19         self.passwd = passwd
20
21
22     def prompt_user_passwd(self, host, realm):
23        return self.username, self.passwd