Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Fixed exc in get_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zrzka committed Oct 16, 2017
1 parent 6879359 commit 0ba8820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## master (unreleased)

* `lib/pep8` removed, not used
* Fixed `get_actions` (exception when user has no custom actions)


## 1.2.1 (2017-10-11)
Expand Down
3 changes: 2 additions & 1 deletion blackmamba/ide/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def run(self, delay=None):
def get_actions():
from objc_util import ObjCClass
defaults = ObjCClass('NSUserDefaults').standardUserDefaults()
return [ActionInfo(ai) for ai in defaults.objectForKey_('EditorActionInfos')]
action_infos = defaults.objectForKey_('EditorActionInfos') or []
return [ActionInfo(ai) for ai in action_infos]


def get_action(title):
Expand Down

0 comments on commit 0ba8820

Please sign in to comment.