summaryrefslogtreecommitdiff
path: root/bin/addons/base/module/module.py
diff options
context:
space:
mode:
authorAnup (OpenERP) <ach@tinyerp.com>2010-06-18 15:06:14 +0530
committerAnup (OpenERP) <ach@tinyerp.com>2010-06-18 15:06:14 +0530
commit253c7786a3831b1426ded7fb6d0d72658f1fabf5 (patch)
tree05eadb92413d80047d7f38d523fd01883d7d28f9 /bin/addons/base/module/module.py
parent6b90ca82c585269c45ac03326fb501b411624f3d (diff)
parent2af260f978976b8934e66393c09b9203ce123cf8 (diff)
[MERGE] Merged from the main trunk server
bzr revid: ach@tinyerp.com-20100615133947-xmf38gf47ljnb00l bzr revid: ach@tinyerp.com-20100616112927-8ecwh6n270tkp6gp bzr revid: ach@tinyerp.com-20100618093614-7wtc8cw3korg3280
Diffstat (limited to 'bin/addons/base/module/module.py')
-rw-r--r--bin/addons/base/module/module.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py
index 9d4ba1df952..ce52f8b1515 100644
--- a/bin/addons/base/module/module.py
+++ b/bin/addons/base/module/module.py
@@ -25,6 +25,7 @@ import re
import urllib
import os
import imp
+import logging
import tools
from osv import fields, osv, orm
import zipfile
@@ -452,17 +453,17 @@ class module(osv.osv):
tools.trans_load(cr.dbname, f, lang, verbose=False)
def check(self, cr, uid, ids, context=None):
- logger = netsvc.Logger()
+ logger = logging.getLogger('init')
for mod in self.browse(cr, uid, ids, context=context):
if not mod.description:
- logger.notifyChannel("init", netsvc.LOG_WARNING, 'module %s: description is empty !' % (mod.name,))
+ logger.warn('module %s: description is empty !', mod.name)
if not mod.certificate or not mod.certificate.isdigit():
- logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: no quality certificate' % (mod.name,))
+ logger.info('module %s: no quality certificate', mod.name)
else:
val = long(mod.certificate[2:]) % 97 == 29
if not val:
- logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module %s: invalid quality certificate: %s' % (mod.name, mod.certificate))
+ logger.critical('module %s: invalid quality certificate: %s', mod.name, mod.certificate)
raise osv.except_osv(_('Error'), _('Module %s: Invalid Quality Certificate') % (mod.name,))