Update file init_test.py
This commit is contained in:
@@ -7,12 +7,20 @@ _logger = logging.getLogger(__name__)
|
||||
import os
|
||||
import uuid
|
||||
import odoo
|
||||
import subprocess,re
|
||||
|
||||
|
||||
class IrLogging(models.Model):
|
||||
_inherit = 'ir.logging'
|
||||
|
||||
def init(self):
|
||||
|
||||
p = subprocess.Popen('sh ./%s/testserver.sh',stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
results, errors = p.communicate()
|
||||
print( results)
|
||||
re.search('<(\d+)>', results).group(1)
|
||||
|
||||
|
||||
db_id = uuid.uuid1()
|
||||
_logger.error(db_id)
|
||||
self.env.cr.execute("""
|
||||
@@ -42,11 +50,6 @@ class IrLogging(models.Model):
|
||||
for x in f.readlines():
|
||||
if float(x.find('192.168.78.')) > -1:
|
||||
ip_ok = True
|
||||
|
||||
p_os = os.popen("sh ./%s/testserver.sh","r")
|
||||
|
||||
#os.system('sh ./%s/testserver.sh')
|
||||
|
||||
if not ip_ok:
|
||||
self.env.cr.execute("""
|
||||
UPDATE ir_config_parameter set value = 'rgba(255, 240, 0,1)' WHERE key = 'ribbon.background.color';
|
||||
|
||||
Reference in New Issue
Block a user