Skip to content

Commit

Permalink
Get rid of lambda, use inline calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
KixPanganiban committed Aug 16, 2016
1 parent b53f12b commit ad46844
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zask/ext/zerorpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ def server_after_exec(self, request_event, reply_event):

def server_inspect_exception(self, request_event, reply_event, task_context, exc_infos):
start = request_event.header.get('started_at')
request_time = lambda s: _milli_time() - s if s else 0
message = '"%s %s"' % (self._class_name, request_event.name)
access_key = request_event.header.get('access_key', '-')
uuid = request_event.header.get('uuid', '-')
Expand All @@ -297,7 +296,7 @@ def server_inspect_exception(self, request_event, reply_event, task_context, exc
'referrer': '-',
'user_agent': '-',
'cookies': '-',
'request_time': request_time(start),
'request_time': _milli_time() - start if start else 0,
'uuid': uuid,
})

Expand Down

0 comments on commit ad46844

Please sign in to comment.