equal
deleted
inserted
replaced
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: |