Skip to content

Commit 8ab7a8c

Browse files
authored
Merge pull request #41 from DevoInc/release-next
Fixes in common loggin item and api errores responses
2 parents 63e9980 + fc2e3e3 commit 8ab7a8c

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
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

7+
## [2.0.2] - 2019-01-23
8+
#### Fixed
9+
* devo.common logging handler
10+
* Errors response in devo.api
11+
712
## [2.0.0] - 2019-01-21
813
#### Changed
914
* Changed all logic in API calls for stream and non stream calls, improving speed in streaming x3

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-2.0.0-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.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-2.0.2-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.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__ = "2.0.0"
3+
__version__ = "2.0.2"
44
__author__ = 'Devo'
55
__author_email__ = 'support@devo.com'
66
__license__ = 'MIT'

devo/api/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def stream_available(resp):
159159
@staticmethod
160160
def _format_error(error):
161161
return '{"msg": "Error Launching Query", "status": 500, ' \
162-
'"object": "%s"}' % error
162+
'"object": "%s"}' % str(error).replace("\"", "\\\"")
163163

164164
@staticmethod
165165
def _is_correct_response(line):

devo/common/logging/log.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
""" Generic function to logging events in Devo SDK """
33
import os
44
import logging
5+
from logging.handlers import RotatingFileHandler
56

67

78
def get_log(path_base="./",
@@ -30,8 +31,6 @@ def set_handler(path, msg_format):
3031
3132
:return: RotatingFileHandler object
3233
"""
33-
handler = logging.handlers.RotatingFileHandler(path,
34-
maxBytes=2097152,
35-
backupCount=5)
34+
handler = RotatingFileHandler(path, maxBytes=2097152, backupCount=5)
3635
handler.setFormatter(set_formatter(msg_format))
3736
return handler

0 commit comments

Comments
 (0)