refactor(cloudcmd) readConfig: add formatMsg

This commit is contained in:
coderaiser 2013-10-18 07:30:32 +00:00
parent e44486c092
commit 2c8edb698c

View file

@ -224,8 +224,9 @@
function readConfig(pCallBack){
fs.readFile(CONFIG_PATH, function(pError, pData){
var msg, status;
if (!pError){
Util.log('config: readed');
status = 'ok';
var lStr = pData.toString(),
lReadedConf = Util.parseJSON(lStr);
@ -241,7 +242,10 @@
});
}
else
Util.log(pError);
status = 'error';
msg = CloudFunc.formatMsg('read', 'config', status);
Util.log(msg);
Util.exec(pCallBack);
});