raising value error
This commit is contained in:
parent
ed51367bdd
commit
14d8d01d92
@ -210,10 +210,13 @@ class QuickmarkCompletionModel(basecompletion.BaseCompletionModel):
|
|||||||
for qm_name, qm_url in objreg.get('quickmark-manager').marks.items():
|
for qm_name, qm_url in objreg.get('quickmark-manager').marks.items():
|
||||||
qmlist.append((qm_url, qm_name))
|
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():
|
for qm_name, qm_url in objreg.get('quickmark-manager').marks.items():
|
||||||
qmlist.append((qm_name, qm_url))
|
qmlist.append((qm_name, qm_url))
|
||||||
|
|
||||||
|
else:
|
||||||
|
raise ValueError("Invalid value '{}' for match_field!".format(match_field))
|
||||||
|
|
||||||
cat = self.new_category("Quickmarks")
|
cat = self.new_category("Quickmarks")
|
||||||
for (name, desc) in qmlist:
|
for (name, desc) in qmlist:
|
||||||
self.new_item(cat, name, desc)
|
self.new_item(cat, name, desc)
|
||||||
|
Loading…
Reference in New Issue
Block a user