Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7092ef2

Browse filesBrowse files
author
Johan Forsberg
committed
generalize integer timestamp handling
1 parent 7e2dd29 commit 7092ef2
Copy full SHA for 7092ef2

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎influxdb/line_protocol.py

Copy file name to clipboardExpand all lines: influxdb/line_protocol.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
from calendar import timegm
55
from copy import copy
66
from datetime import datetime
7+
from numbers import Integral
78

89
from dateutil.parser import parse
910
from six import binary_type, text_type
1011

1112

1213
def _convert_timestamp(timestamp, precision=None):
13-
if isinstance(timestamp, int):
14+
if isinstance(timestamp, Integral):
1415
return timestamp # assume precision is correct if timestamp is int
1516
if isinstance(_get_unicode(timestamp), text_type):
1617
timestamp = parse(timestamp)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.