Skip to content

Commit

Permalink
Merge pull request #1282 from kyrias/py37-async-method-name
Browse files Browse the repository at this point in the history
db/manager: Prepend underscore to method named async

Fixes #1283
  • Loading branch information
dcbaker committed Aug 1, 2018
2 parents 3c0097c + 06f1295 commit 8d1ef69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alot/db/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def get_named_queries(self):
db = Database(path=self.path)
return {k[6:]: v for k, v in db.get_configs('query.')}

def async(self, cbl, fun):
def async_(self, cbl, fun):
"""
return a pair (pipe, process) so that the process writes
`fun(a)` to the pipe for each element `a` in the iterable returned
Expand Down Expand Up @@ -403,7 +403,7 @@ def get_threads(self, querystring, sort='newest_first', exclude_tags=None):
if exclude_tags:
for tag in exclude_tags:
q.exclude_tag(tag)
return self.async(q.search_threads, (lambda a: a.get_thread_id()))
return self.async_(q.search_threads, (lambda a: a.get_thread_id()))

def query(self, querystring):
"""
Expand Down

0 comments on commit 8d1ef69

Please sign in to comment.