From 546b76d5d3ed95af3f8d7d38504f25732baac4da Mon Sep 17 00:00:00 2001 From: Julien Thewys Date: Mon, 8 Mar 2010 09:55:32 +0100 Subject: [PATCH] [REF] Reoarganized imports, catches yaml not found. bzr revid: jth@openerp.com-20100308085532-1yv9xv1tosz223vs --- bin/tools/yaml_import.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/tools/yaml_import.py b/bin/tools/yaml_import.py index 2c334c9cd3c..9632842bc80 100644 --- a/bin/tools/yaml_import.py +++ b/bin/tools/yaml_import.py @@ -1,15 +1,20 @@ # -*- encoding: utf-8 -*- import types -import yaml import time # used to eval time.strftime expressions import logging import pooler import netsvc import misc - from config import config +try: + import yaml +except ImportError, e: + msg = "Module yaml was not found." + e.args = (msg,) + raise e + logger_channel = 'tests' class YamlImportException(Exception):