taskwiki: The errors module should be available outside exception handler

This commit is contained in:
Tomas Babej 2015-12-27 12:40:58 +01:00
parent 3e7275752e
commit 38ae7730fa

View file

@ -9,9 +9,9 @@ import vim # pylint: disable=F0401
BASE_DIR = vim.eval("s:plugin_path")
sys.path.insert(0, os.path.join(BASE_DIR, 'taskwiki'))
import errors
# Handle exceptions without traceback, if they're TaskWikiException
def output_exception(exception_type, value, tb):
import errors
if exception_type is errors.TaskWikiException:
print(unicode(value), file=sys.stderr)
else: