Fix NEWNEWS

This commit is contained in:
XANTRONIX Development 2024-12-04 22:25:48 -05:00
parent ba597eaf7f
commit 3067b812d5

View file

@ -400,7 +400,9 @@ class Session(Connection):
match = self.RE_DATE_SHORT.match(datestr) match = self.RE_DATE_SHORT.match(datestr)
if match: 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: if yy >= 70:
yyyy = 1900 + yy yyyy = 1900 + yy
@ -409,7 +411,9 @@ class Session(Connection):
match = self.RE_DATE_LONG.match(datestr) match = self.RE_DATE_LONG.match(datestr)
if match: 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: if yyyy is None:
return return
@ -418,7 +422,9 @@ class Session(Connection):
if match is None: if match is None:
return 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) 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())) cr = self.db.execute(sql, (newsgroup.id, timestamp.isoformat()))
for row in cr.each(): while True:
self.print(row[0]) row = cr.fetchone()
if row is None:
break
self.print(str(row[0]))
return self.end() return self.end()