Skip to content

Commit

Permalink
Fixed p23 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen van der Heijden committed Oct 27, 2016
1 parent 8caf41c commit 9b320c2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
2016.x.x, Version 2.x.x (BETA)
2016.10.27, Version 2.0.4 (BETA)

- Check for correct types using assert in query method.
- Fixed Python 2 to 3 compatibility

2016.10.26, Version 2.0.3 (BETA)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from distutils.core import setup
import setuptools

VERSION = '2.0.3'
VERSION = '2.0.4'

setup(
name='siridb-connector-twisted',
Expand Down
2 changes: 1 addition & 1 deletion siridb/twisted/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .lib.client import SiriDBClientTwisted


__version_info__ = (2, 0, 3)
__version_info__ = (2, 0, 4)
__version__ = '.'.join(map(str, __version_info__))
__maintainer__ = 'Jeroen van der Heijden'
__email__ = 'jeroen@transceptor.technology'
Expand Down
7 changes: 5 additions & 2 deletions siridb/twisted/lib/client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import logging
import random
import time
Expand All @@ -12,6 +13,8 @@
from .exceptions import PoolError
from .exceptions import AuthenticationError

STRCMP = (str, bytes) if sys.version_info[0] == 3 else (str, unicode, bytes)

# never wait more than x seconds before trying to connect again
DEFAULT_MAX_WAIT_RETRY = 90

Expand Down Expand Up @@ -132,7 +135,7 @@ def close(self):
factory.connector.disconnect()

@defer.inlineCallbacks
def insert(self, data, timeout=120):
def insert(self, data, timeout=300):
'''Insert data into SiriDB.
see module doc-string for info on exception handling.
Expand Down Expand Up @@ -162,7 +165,7 @@ def query(self, query, timePrecision=None, timeout=60):
see module doc-string for info on exception handling.
'''
assert isinstance(query, (str, unicode, bytes)), \
assert isinstance(query, STRCMP), \
'query should be of type str, unicode or bytes'

assert timePrecision is None or isinstance(timePrecision, int), \
Expand Down

0 comments on commit 9b320c2

Please sign in to comment.