git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX: IOT-Lab create user on onelab registration validation
[unfold.git]
/
activity
/
__init__.py
diff --git
a/activity/__init__.py
b/activity/__init__.py
index
dfb7007
..
4719a61
100644
(file)
--- a/
activity/__init__.py
+++ b/
activity/__init__.py
@@
-62,17
+62,19
@@
def logWrite(request, action, message, objects = None):
"testbed" : None,
}
"testbed" : None,
}
- for o in objects :
- if (o in log) :
- log[o] = objects[o]
+ if objects is not None:
+ for o in objects :
+ if (o in log) :
+ log[o] = objects[o]
try :
result = urllib2.urlopen(server, urllib.urlencode(log))
try :
result = urllib2.urlopen(server, urllib.urlencode(log))
- print "===============>> activity: %s <%s> " % (action, request.user,message)
+ print "===============>> activity: %s <%s>
%s
" % (action, request.user,message)
content = result.read()
except urllib2.URLError as e:
print "===============>> activity: connection to " + server + " impossible, could not log action"
content = result.read()
except urllib2.URLError as e:
print "===============>> activity: connection to " + server + " impossible, could not log action"
- print "==>> " + e.strerror
+ print e.strerror
+ print ""
def log(request, action, message, objects = None):
# Create a new thread in Daemon mode to send the log entry
def log(request, action, message, objects = None):
# Create a new thread in Daemon mode to send the log entry