catch AttributeError when file extension is checked
@@ -35,14 +35,15 @@ class Syntax(object):
accepted = accepted_extensions()
- try:
file = view.file_name()
+
+ try:
ext = file.split(".")[-1]
+ except AttributeError:
+ ext = ""
if(ext not in accepted):
return
- except:
- return
plugin_name = deviot.plugin_name()
plugin_path = deviot.plugin_path()
