Commit 2c549b5b authored by Ignacio Corderi's avatar Ignacio Corderi
Browse files

Accept None keys on keyRange - #10

parent 27abdb0d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ This section will document changes to the library since the last release
## New features
- Added handshake to negotiate connection id during connect
- Added TCP_NODELAY socket option to improve performance
- GetKeyRange operations now accept None arguments on keys (Issue #10)

## Behavior changes
- Removed DEVICE log from LogTypes.add() (Issue #15)
+6 −1
Original line number Diff line number Diff line
@@ -172,7 +172,12 @@ class GetPrevious(object):
class GetKeyRange(object):

    @staticmethod
    def build(startKey, endKey, startKeyInclusive=True, endKeyInclusive=True, maxReturned=200):
    def build(startKey=None, endKey=None, startKeyInclusive=True, endKeyInclusive=True, maxReturned=200):
        if not startKey:
            startKey = ''
        if not endKey:
            endKey = '\xFF' * common.MAX_KEY_SIZE

        if len(startKey) > common.MAX_KEY_SIZE: raise common.KineticClientException("Start key exceeds maximum size of {0} bytes.".format(common.MAX_KEY_SIZE))
        if len(endKey) > common.MAX_KEY_SIZE: raise common.KineticClientException("End key exceeds maximum size of {0} bytes.".format(common.MAX_KEY_SIZE))