Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions explainshell/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def updatemanpage(self, m):
logger.info('updating manpage %s', m.source)
m.updated = True
self.manpage.update({'source' : m.source}, m.to_store())
_id = self.manpage.find_one({'source' : m.source}, fields={'_id':1})['_id']
_id = self.manpage.find_one({'source' : m.source}, projection=['_id'])['_id']
for alias, score in m.aliases:
if alias not in self:
self.addmapping(alias, _id, score)
Expand All @@ -369,7 +369,7 @@ def verify(self):
# check that everything in manpage is reachable
mappings = list(self.mapping.find())
reachable = set([m['dst'] for m in mappings])
manpages = set([m['_id'] for m in self.manpage.find(fields={'_id':1})])
manpages = set([m['_id'] for m in self.manpage.find(projection=['_id'])])

ok = True
unreachable = manpages - reachable
Expand All @@ -386,12 +386,12 @@ def verify(self):
return ok, unreachable, notfound

def names(self):
cursor = self.manpage.find(fields={'name':1})
cursor = self.manpage.find(projection=['_id', 'name'])
for d in cursor:
yield d['_id'], d['name']

def mappings(self):
cursor = self.mapping.find(fields={'src':1})
cursor = self.mapping.find(projection=['_id,', 'src'])
for d in cursor:
yield d['src'], d['_id']

Expand Down