sobjects/parsers.py
changeset 6994 4b2c7e401065
parent 6975 75a232b2e477
child 6995 6efb5a5696bd
equal deleted inserted replaced
6991:eb2ba251f093 6994:4b2c7e401065
    54 def convert_interval(ustr):
    54 def convert_interval(ustr):
    55     return time(seconds=int(ustr))
    55     return time(seconds=int(ustr))
    56 DEFAULT_CONVERTERS['Interval'] = convert_interval
    56 DEFAULT_CONVERTERS['Interval'] = convert_interval
    57 
    57 
    58 # use a cookie enabled opener to use session cookie if any
    58 # use a cookie enabled opener to use session cookie if any
    59 _OPENER = urllib2.build_opener(urllib2.HTTPCookieProcessor(CookieJar()))
    59 from logilab.common import urllib2ext
       
    60 _OPENER = urllib2.build_opener()
       
    61 _OPENER.add_handler(urllib2ext.HTTPGssapiAuthHandler())
       
    62 _OPENER.add_handler(urllib2.HTTPCookieProcessor(CookieJar()))
    60 
    63 
    61 def extract_typed_attrs(eschema, stringdict, converters=DEFAULT_CONVERTERS):
    64 def extract_typed_attrs(eschema, stringdict, converters=DEFAULT_CONVERTERS):
    62     typeddict = {}
    65     typeddict = {}
    63     for rschema in eschema.subject_relations():
    66     for rschema in eschema.subject_relations():
    64         if rschema.final and rschema in stringdict:
    67         if rschema.final and rschema in stringdict: