Return None when there's no menu entries

This commit is contained in:
cncfanatics
2010-10-30 20:45:03 +02:00
parent 1d85fd1b74
commit 415d15b921

View File

@@ -68,7 +68,7 @@ class ContextMenu(object):
if amount > 0 and i != len(contexts) - 1:
menu.AppendSeparator()
return menu
return menu if empty is False else None
@classmethod
def handler(cls, event):