Skip to content

Commit

Permalink
fix package.xml onload parse exception
Browse files Browse the repository at this point in the history
  • Loading branch information
xjsender committed Mar 11, 2016
1 parent 2fa1aae commit 655a058
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions events.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ def on_load_async(self, view):
if cname and "package.xml" in cname.lower():
with open(view.file_name(), "rb") as fp:
content = fp.read()
types = util.build_package_types(content)
view.settings().set("types", types)
try:
types = util.build_package_types(content)
view.settings().set("types", types)
except:
pass

def on_post_save_async(self, view):
settings = context.get_settings();
Expand Down

0 comments on commit 655a058

Please sign in to comment.