raising value error

This commit is contained in:
Claude 2014-10-19 23:04:32 +02:00
parent ed51367bdd
commit 14d8d01d92

View File

@ -210,10 +210,13 @@ class QuickmarkCompletionModel(basecompletion.BaseCompletionModel):
for qm_name, qm_url in objreg.get('quickmark-manager').marks.items():
qmlist.append((qm_url, qm_name))
if match_field == 'name':
elif match_field == 'name':
for qm_name, qm_url in objreg.get('quickmark-manager').marks.items():
qmlist.append((qm_name, qm_url))
else:
raise ValueError("Invalid value '{}' for match_field!".format(match_field))
cat = self.new_category("Quickmarks")
for (name, desc) in qmlist:
self.new_item(cat, name, desc)