Simplify each_newsgroup()
This commit is contained in:
parent
1b519cfcfd
commit
5632447263
1 changed files with 1 additions and 4 deletions
|
@ -53,10 +53,7 @@ class Session(Connection):
|
|||
return self.db.get(Newsgroup, {'name': name})
|
||||
|
||||
def each_newsgroup(self):
|
||||
cr = self.db.query(Newsgroup)
|
||||
|
||||
for newsgroup in cr.each():
|
||||
yield newsgroup
|
||||
yield from self.db.query(Newsgroup).each()
|
||||
|
||||
def respond(self, code: ResponseCode, message: str=None, body=None):
|
||||
response = Response(code, message, body)
|
||||
|
|
Loading…
Add table
Reference in a new issue