Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyanhui committed Jul 28, 2014
1 parent 390fd06 commit 92972a3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions FileHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# @Author: lime
# @Date: 2013-10-28 13:39:48
# @Last Modified by: Lime
# @Last Modified time: 2014-07-28 13:11:53
# @Last Modified time: 2014-07-28 18:05:30

import os
import sys
Expand Down Expand Up @@ -115,7 +115,6 @@ def get_template_part(syntax_type, part):
contents = template_file.read()
template_file.close()
except Exception as e:
sublime.error_message(str(e))
contents = ''
return contents

Expand Down Expand Up @@ -226,8 +225,7 @@ def render_template(syntax_type, part=None, options={}):
template = Template(get_template(syntax_type))

render_string = template.render(get_args(syntax_type, options))
except Exception as e:
sublime.error_message(str(e))
except:
render_string = ''
return render_string

Expand Down Expand Up @@ -294,7 +292,7 @@ def new_file(self, path, syntax_type):
try:
with open(path, 'w+') as f:
f.write(header)
f.close()

except Exception as e:
sublime.error_message(str(e))
return
Expand Down

0 comments on commit 92972a3

Please sign in to comment.