It turned out that, despite the program working without apparent errors,
the code for setting the language was completely wrong. First, it didn't
run unless some form of authentication was performed. Second, I
misstyped _LANG_URL as _LOGIN_URL, so the language was not being set at
all! Amazing it still worked.
self.to_stderr(u'WARNING: parsing .netrc: %s' % str(err))
return
self.to_stderr(u'WARNING: parsing .netrc: %s' % str(err))
return
- # No authentication to be performed
- if username is None:
- return
-
- request = urllib2.Request(self._LOGIN_URL, None, std_headers)
+ request = urllib2.Request(self._LANG_URL, None, std_headers)
try:
self.report_lang()
urllib2.urlopen(request).read()
try:
self.report_lang()
urllib2.urlopen(request).read()
self.to_stderr(u'WARNING: unable to set language: %s' % str(err))
return
self.to_stderr(u'WARNING: unable to set language: %s' % str(err))
return
+ # No authentication to be performed
+ if username is None:
+ return
+
# Log in
login_form = {
'current_form': 'loginForm',
# Log in
login_form = {
'current_form': 'loginForm',