Permalink
Browse files

Update from sergeche

  • Loading branch information...
1 parent 04f3faf commit d5efaacb46ac3b798de517e8dc9f675b8005af7e @fmarcia committed Jun 17, 2010
Showing with 10 additions and 8 deletions.
  1. +2 −5 zencoding/zen_core.py
  2. +8 −3 zencoding/zen_file.py
@@ -771,11 +771,8 @@ def run_action(name, *args, **kwargs):
"""
import zen_actions
- try:
- if hasattr(zen_actions, name):
- return getattr(zen_actions, name)(*args, **kwargs)
- except:
- return False
+ if hasattr(zen_actions, name):
+ return getattr(zen_actions, name)(*args, **kwargs)
def expand_abbreviation(abbr, syntax='html', profile_name='plain'):
"""
View
@@ -11,9 +11,14 @@ def read(path):
@type path: str
@return: str
"""
- fp = open(path, 'rb')
- content = fp.read()
- fp.close()
+ content = None
+ try:
+ fp = open(path, 'rb')
+ content = fp.read()
+ fp.close()
+ except:
+ pass
+
return content
def locate_file(editor_file, file_name): # (FM) infinite loop fix

0 comments on commit d5efaac

Please sign in to comment.