Fix typos and whatnot
This commit is contained in:
parent
f07bb981e9
commit
a34bb7a6a7
2 changed files with 4 additions and 8 deletions
|
@ -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():
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue