Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
e031a88d
Commit
e031a88d
authored
Oct 22, 2014
by
Mathieu Giraud
Committed by
Vidjil Team
Oct 22, 2014
Browse files
models/db.py: log works even if "message" is not defined
parent
8fbb3e6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/models/db.py
View file @
e031a88d
...
@@ -224,7 +224,10 @@ class MsgUserAdapter(logging.LoggerAdapter):
...
@@ -224,7 +224,10 @@ class MsgUserAdapter(logging.LoggerAdapter):
def
process
(
self
,
msg
,
kwargs
):
def
process
(
self
,
msg
,
kwargs
):
if
type
(
msg
)
is
dict
:
if
type
(
msg
)
is
dict
:
msg
=
msg
[
'message'
]
if
'message'
in
msg
:
msg
=
msg
[
'message'
]
else
:
msg
=
'?'
ip
=
request
.
client
ip
=
request
.
client
if
ip
in
ips
:
if
ip
in
ips
:
ip
=
"%s/%s"
%
(
ip
,
ips
[
ip
])
ip
=
"%s/%s"
%
(
ip
,
ips
[
ip
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment