If sorting is invoked without an open project, the following exception is raised:
Traceback (most recent call last):
File "/home/bj/src/sublime_text/Lib/python33/sublime_plugin.py", line 1499, in run_
return self.run(edit)
File "/home/bj/.config/sublime-text-3/Installed Packages/isorted.sublime-package/isorted.py", line 33, in run
File "/home/bj/.config/sublime-text-3/Installed Packages/isorted.sublime-package/isorted.py", line 62, in command_line
File "/home/bj/.config/sublime-text-3/Installed Packages/isorted.sublime-package/isorted.py", line 114, in settings
AttributeError: 'NoneType' object has no attribute 'get'
Line 114 reads:
for name, value in self.view.window().project_data().get("settings", {}).items():
I think this should be guarded against project_data() returning None instead of a dictionary. Something like this:
project_data = self.view.window().project_data()
if project_data:
for name, value in project_data.get("settings", {}).items():
If sorting is invoked without an open project, the following exception is raised:
Line 114 reads:
I think this should be guarded against
project_data()
returningNone
instead of a dictionary. Something like this: