from tic.utils import error
from tic.utils.file import write, make_dirs
import yaml
+from tic.config import configmgr
def get_default_recipe():
Repositories=[
dict(Name='tizen-unified',
Url='http://download.tizen.org/live/devel:/Tizen:/Unified/standard/',
+ #Url='file://home/shinchulwoo/Repo/Unified',
Options='--ssl_verify=no'),
dict(Name='tizen-base',
Url='http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packages/',
+ #Url='file://home/shinchulwoo/Repo/Base',
Options='--ssl_verify=no')
],
Partitions=[
return recipe
def load_yaml(path):
+ logger = logging.getLogger(__name__)
try:
with file(path) as f:
return yaml.load(f)
- except IOError:
- raise error.TICError('cannot read meta file: %s' % path)
- except:
- raise error.TICError('yaml format error of meta file: %s' % path)
+ except IOError as err:
+ logger(err)
+ raise error.TICError(configmgr.message['server_error'])
+ except yaml.YAMLError as err:
+ logger(err)
+ raise error.TICError(configmgr.message['recipe_parse_error'] % os.path.basename(path))
def convert_recipe_to_yaml(recipe, filepath):