mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 12:12:54 +01:00
24 lines
537 B
Python
24 lines
537 B
Python
"""Provide a class for loading data from URL's that handles basic
|
|
authentication"""
|
|
|
|
ident = '$Id$'
|
|
from version import __version__
|
|
|
|
from Config import Config
|
|
from urllib import FancyURLopener
|
|
|
|
class URLopener(FancyURLopener):
|
|
|
|
username = None
|
|
passwd = None
|
|
|
|
|
|
def __init__(self, username=None, passwd=None, *args, **kw):
|
|
FancyURLopener.__init__( self, *args, **kw)
|
|
self.username = username
|
|
self.passwd = passwd
|
|
|
|
|
|
def prompt_user_passwd(self, host, realm):
|
|
return self.username, self.passwd
|