Skip to content

Commit 9136c2b

Browse files
authored
Merge pull request #66 from Worvast/master
Fix Sender for logging and Date ints in config
2 parents b09e57d + dce116c commit 9136c2b

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77

8+
## [3.0.2] - 2019-07-01
9+
#### Fixed
10+
* API dates when int, verify if len its correct before add 3 zero
11+
* Problem overriding tag when use Sender for logging
12+
813
## [3.0.1] - 2019-06-27
914
#### Fixed
1015
* Fixed always debug on reconnection

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[![master Build Status](https://travis-ci.com/DevoInc/python-sdk.svg?branch=master)](https://travis-ci.com/DevoInc/python-sdk) [![LICENSE](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/DevoInc/python-sdk/blob/master/LICENSE)
33

4-
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-3.0.1-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-sdk/)
4+
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-3.0.2-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-sdk/)
55

66

77
# Devo Python SDK

devo/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__description__ = 'Devo Python Library.'
22
__url__ = 'http://www.devo.com'
3-
__version__ = "3.0.1"
3+
__version__ = "3.0.2"
44
__author__ = 'Devo'
55
__author_email__ = 'support@devo.com'
66
__license__ = 'MIT'

devo/common/dates/dateparser.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def default_from(date=None):
6262
:return: Millis for the API
6363
"""
6464
if isinstance(date, int):
65-
return date * 1000
65+
if len(str(abs(date))) == 10:
66+
return date * 1000
67+
return date
6668
return parse(date, 'now()-day()')
6769

6870

@@ -73,5 +75,7 @@ def default_to(date=None):
7375
:return: Millis for the API
7476
"""
7577
if isinstance(date, int):
76-
return date * 1000
78+
if len(str(abs(date))) == 10:
79+
return date * 1000
80+
return date
7781
return parse(date, 'now()')

devo/sender/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def for_logging(config=None, con_type=None, tag=None, level=None):
441441
elif isinstance(config, dict):
442442
con.logging['level'] = config.get("verbose_level", 10)
443443
else:
444-
con.logging['tag'] = 10
444+
con.logging['level'] = 10
445445

446446
return con
447447

0 commit comments

Comments
 (0)