mhlib.py: delay opening of sequences file so we don't overwrite it when
putsequences is called with a bad argument
rfc822.py: better handling of dates with no or bad timezones
uu.py: contributed by Lance -- uu{en,de}code
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index 886098c..fcf31fb 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -329,11 +329,18 @@
'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
def parsedate(data):
- # XXX This completely ignores timezone matters at the moment...
+ # XXX This still mostly ignores timezone matters at the moment...
data = string.split(data)
if data[0][-1] == ',':
# There's a dayname here. Skip it
del data[0]
+ if len(data) == 4:
+ s = data[3]
+ i = string.find(s, '+')
+ if i > 0:
+ data[3:] = [s[:i], s[i+1:]]
+ else:
+ data.append('') # Dummy tz
if len(data) < 5:
return None
data = data[:5]