Skip to content
Snippets Groups Projects
Commit eaf0857d authored by jkerdreu's avatar jkerdreu
Browse files

Fix warp10 logging a string (which is not an list un py3)



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2689 b32b6428-25c9-4566-ad07-03861ab6144f
parent 44d92f35
Branches
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ PACKAGE_NAME = "xaal.warp10"
logger = logging.getLogger(PACKAGE_NAME)
# period between two push
PUSH_RATE = 60
PUSH_RATE = 30
DATA_BUF = ''
class WARP10Logger:
......@@ -35,6 +35,7 @@ class WARP10Logger:
global DATA_BUF
if len(DATA_BUF)==0:
return
print(DATA_BUF)
try:
#logger.debug(DATA_BUF)
rsp = self.http.request('POST', self.cfg['url'],headers={'X-Warp10-Token':self.cfg['token']},body=DATA_BUF,retries=2)
......@@ -67,7 +68,7 @@ class WARP10Logger:
for k in msg.body:
name = '%s.%s' % (base,k)
value = msg.body[k]
if value != None and type(value)!=list:
if value != None and (type(value) not in [list,str]):
buf = buf +"%s// %s%s %s\n" % (now,name,tags,value)
# log notification with no body (click...)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment