From a34bb7a6a786f06614d44d3b62aa4a8812788294 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 25 Nov 2024 00:16:15 -0500 Subject: [PATCH] Fix typos and whatnot --- lib/nntp/tiny/server.py | 4 ++-- lib/nntp/tiny/session.py | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/nntp/tiny/server.py b/lib/nntp/tiny/server.py index c70df45..f96f5d8 100644 --- a/lib/nntp/tiny/server.py +++ b/lib/nntp/tiny/server.py @@ -9,12 +9,12 @@ class ServerCapability(enum.Flag): POST = enum.auto() class Server(): - def __init_(self, db: Database): + def __init__(self, db: Database): self.db = db self.capabilities = ServerCapability.NONE self.newsgroups = dict() - self._init_groups() + self._init_newsgroups() def _init_newsgroups(self): for newsgroup in self.db.query(Newsgroup).each(): diff --git a/lib/nntp/tiny/session.py b/lib/nntp/tiny/session.py index a07ca2c..537c50c 100644 --- a/lib/nntp/tiny/session.py +++ b/lib/nntp/tiny/session.py @@ -88,7 +88,7 @@ class Session(): NNTP_VERSION = 2 NNTP_CAPABILITIES = [ - 'VERSION %d' % (self.NNTP_VERSION), + 'VERSION %d' % (NNTP_VERSION), 'READER', 'HDR', 'NEWNEWS', @@ -96,10 +96,6 @@ class Session(): 'OVER MSGID' ] - COMMANDS = { - 'capabilities': - } - def __init__(self, server: Server, sock: socket.socket): self.server: Server = server self.db: Database = server.db @@ -215,7 +211,7 @@ class Session(): if len(args) > 1: msgrange = MessageRange.parse(args[1]) - sql += " and " msgrange.clause() + sql += " and " + msgrange.clause() summary = self._newsgroup_summary(newsgroup) cr = self.db.execute(sql, (newsgroup.id))