[REF] fix weird indentation, not multiple of four.

bzr revid: florent.xicluna@gmail.com-20120119191756-niny262vp1nvmpp8
This commit is contained in:
Florent Xicluna 2012-01-19 20:17:56 +01:00
parent 82f780e948
commit e7838dfbc4
5 changed files with 24 additions and 24 deletions

View File

@ -84,12 +84,12 @@ class Service(object):
cls._services.pop(name)
def LocalService(name):
# Special case for addons support, will be removed in a few days when addons
# are updated to directly use openerp.osv.osv.service.
if name == 'object_proxy':
return openerp.osv.osv.service
# Special case for addons support, will be removed in a few days when addons
# are updated to directly use openerp.osv.osv.service.
if name == 'object_proxy':
return openerp.osv.osv.service
return Service._services[name]
return Service._services[name]
class ExportService(object):
""" Proxy for exported services.
@ -198,9 +198,9 @@ def init_logger():
# server intended to test it.
def init_alternative_logger():
class H(logging.Handler):
def emit(self, record):
if record.levelno > 20:
print record.levelno, record.pathname, record.msg
def emit(self, record):
if record.levelno > 20:
print record.levelno, record.pathname, record.msg
handler = H()
logger = logging.getLogger()
logger.handlers = []

View File

@ -98,10 +98,10 @@ def transfer_node_to_modifiers(node, modifiers, context=None, in_tree_view=False
if node.get('states'):
if 'invisible' in modifiers and isinstance(modifiers['invisible'], list):
# TODO combine with AND or OR, use implicit AND for now.
modifiers['invisible'].append(('state', 'not in', node.get('states').split(',')))
# TODO combine with AND or OR, use implicit AND for now.
modifiers['invisible'].append(('state', 'not in', node.get('states').split(',')))
else:
modifiers['invisible'] = [('state', 'not in', node.get('states').split(','))]
modifiers['invisible'] = [('state', 'not in', node.get('states').split(','))]
for a in ('invisible', 'readonly', 'required'):
if node.get(a):
@ -894,8 +894,8 @@ class BaseModel(object):
for c in cls.__dict__.get(s, []):
exist = False
for c2 in range(len(new)):
#For _constraints, we should check field and methods as well
if new[c2][2]==c[2] and (new[c2][0] == c[0] \
#For _constraints, we should check field and methods as well
if new[c2][2]==c[2] and (new[c2][0] == c[0] \
or getattr(new[c2][0],'__name__', True) == \
getattr(c[0],'__name__', False)):
# If new class defines a constraint with
@ -2690,7 +2690,7 @@ class BaseModel(object):
elif val in dict(self._columns[field].selection(self, cr, uid, context=context)):
return
raise except_orm(_('ValidateError'),
_('The value "%s" for the field "%s.%s" is not in the selection') % (value, self._table, field))
_('The value "%s" for the field "%s.%s" is not in the selection') % (value, self._table, field))
def _check_removed_columns(self, cr, log=False):
# iterate on the database columns to drop the NOT NULL constraints

View File

@ -125,9 +125,9 @@ class TinySocketServerThread(threading.Thread,netsvc.Server):
ct.start()
lt = len(self.threads)
if (lt > 10) and (lt % 10 == 0):
# Not many threads should be serving at the same time, so log
# their abuse.
netsvc.Logger().notifyChannel("web-services", netsvc.LOG_DEBUG,
# Not many threads should be serving at the same time, so log
# their abuse.
netsvc.Logger().notifyChannel("web-services", netsvc.LOG_DEBUG,
"Netrpc: %d threads" % len(self.threads))
self.socket.close()
except Exception, e:

View File

@ -521,11 +521,11 @@ GNU Public Licence.
'OS Name : %s\n' \
%(platform.platform(), platform.os.name)
if os.name == 'posix':
if platform.system() == 'Linux':
lsbinfo = os.popen('lsb_release -a').read()
environment += '%s'%(lsbinfo)
else:
environment += 'Your System is not lsb compliant\n'
if platform.system() == 'Linux':
lsbinfo = os.popen('lsb_release -a').read()
environment += '%s'%(lsbinfo)
else:
environment += 'Your System is not lsb compliant\n'
environment += 'Operating System Release : %s\n' \
'Operating System Version : %s\n' \
'Operating System Architecture : %s\n' \

View File

@ -19,8 +19,8 @@ ADMIN_USER_ID = common.ADMIN_USER_ID
ADMIN_PASSWORD = common.ADMIN_PASSWORD
def setUpModule():
common.start_openerp()
common.create_xmlrpc_proxies()
common.start_openerp()
common.create_xmlrpc_proxies()
tearDownModule = common.tearDownModule