diff options
author | Tim Graham <timograham@gmail.com> | 2016-03-28 18:33:29 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-04-08 09:51:06 -0400 |
commit | df8d8d4292684d6ffa7474f1e201aed486f02b53 (patch) | |
tree | c661bf9b33de5288afe4f63347a2a9c768ef98eb /django/db/backends/utils.py | |
parent | 2956e2f5e3f63d279f5dae2a995265364d3e6db1 (diff) | |
download | django-df8d8d4292684d6ffa7474f1e201aed486f02b53.tar.gz |
Fixed E128 flake8 warnings in django/.
Diffstat (limited to 'django/db/backends/utils.py')
-rw-r--r-- | django/db/backends/utils.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py index 94134811dd..dce453b7b0 100644 --- a/django/db/backends/utils.py +++ b/django/db/backends/utils.py @@ -85,7 +85,8 @@ class CursorDebugWrapper(CursorWrapper): 'sql': sql, 'time': "%.3f" % duration, }) - logger.debug('(%.3f) %s; args=%s', duration, sql, params, + logger.debug( + '(%.3f) %s; args=%s', duration, sql, params, extra={'duration': duration, 'sql': sql, 'params': params} ) @@ -104,7 +105,8 @@ class CursorDebugWrapper(CursorWrapper): 'sql': '%s times: %s' % (times, sql), 'time': "%.3f" % duration, }) - logger.debug('(%.3f) %s; args=%s', duration, sql, param_list, + logger.debug( + '(%.3f) %s; args=%s', duration, sql, param_list, extra={'duration': duration, 'sql': sql, 'params': param_list} ) @@ -154,9 +156,11 @@ def typecast_timestamp(s): # does NOT store time zone information else: microseconds = '0' tzinfo = utc if settings.USE_TZ else None - return datetime.datetime(int(dates[0]), int(dates[1]), int(dates[2]), + return datetime.datetime( + int(dates[0]), int(dates[1]), int(dates[2]), int(times[0]), int(times[1]), int(seconds), - int((microseconds + '000000')[:6]), tzinfo) + int((microseconds + '000000')[:6]), tzinfo + ) def typecast_decimal(s): |