Fix NEWNEWS
This commit is contained in:
parent
ba597eaf7f
commit
3067b812d5
1 changed files with 16 additions and 5 deletions
|
@ -400,7 +400,9 @@ class Session(Connection):
|
|||
|
||||
match = self.RE_DATE_SHORT.match(datestr)
|
||||
if match:
|
||||
yy, mm, dd = map(int, match[1:3])
|
||||
yy = int(match[1])
|
||||
mm = int(match[2])
|
||||
dd = int(match[3])
|
||||
|
||||
if yy >= 70:
|
||||
yyyy = 1900 + yy
|
||||
|
@ -409,7 +411,9 @@ class Session(Connection):
|
|||
|
||||
match = self.RE_DATE_LONG.match(datestr)
|
||||
if match:
|
||||
yyyy, mm, dd = map(int, match[1:3])
|
||||
yyyy = int(match[1])
|
||||
mm = int(match[2])
|
||||
dd = int(match[3])
|
||||
|
||||
if yyyy is None:
|
||||
return
|
||||
|
@ -418,7 +422,9 @@ class Session(Connection):
|
|||
if match is None:
|
||||
return
|
||||
|
||||
hh, mm, ss = map(int, match[1:3])
|
||||
hh = int(match[1])
|
||||
MM = int(match[2])
|
||||
ss = int(match[3])
|
||||
|
||||
return datetime.datetime(yyyy, mm, dd, hh, MM, ss)
|
||||
|
||||
|
@ -458,8 +464,13 @@ class Session(Connection):
|
|||
|
||||
cr = self.db.execute(sql, (newsgroup.id, timestamp.isoformat()))
|
||||
|
||||
for row in cr.each():
|
||||
self.print(row[0])
|
||||
while True:
|
||||
row = cr.fetchone()
|
||||
|
||||
if row is None:
|
||||
break
|
||||
|
||||
self.print(str(row[0]))
|
||||
|
||||
return self.end()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue