From 144b053fd3441742b00806878ef259105fe83330 Mon Sep 17 00:00:00 2001 From: Jeanneret Cedric Date: Fri, 30 May 2014 08:54:52 +0200 Subject: [PATCH] =?UTF-8?q?we=20want=200=20and=201,=20not=201=20and=202?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.py b/src/api.py index f4ddb803..3505fa33 100644 --- a/src/api.py +++ b/src/api.py @@ -314,7 +314,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): raise APIError(0, 'Too many parameters!') if len(passphrase) == 0: raise APIError(1, 'The specified passphrase is blank.') - if isinstance(eighteenByteRipe, int) and eighteenByteRipe in [1,2]: + if isinstance(eighteenByteRipe, int) and eighteenByteRipe in [0,1]: eighteenByteRipe = bool(eighteenByteRipe) if not isinstance(eighteenByteRipe, bool): raise APIError(23, 'Bool expected in eighteenByteRipe, saw %s instead' % type(eighteenByteRipe)) @@ -485,7 +485,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): elif len(params) >= 2: msgid = self._decode(params[0], "hex") readStatus = params[1] - if isinstance(readStatus, int) and readStatus in [1,2]: + if isinstance(readStatus, int) and readStatus in [0,1]: readStatus = bool(readStatus) if not isinstance(readStatus, bool): raise APIError(23, 'Bool expected in readStatus, saw %s instead.' % type(readStatus))