summaryrefslogtreecommitdiff
path: root/common/src/leap
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-08-20 14:47:14 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-08-26 17:20:22 -0300
commitde73fc6969433a69ec6ba12ec508c3c93b83fcc6 (patch)
tree04feebed061697c212e7e07858c31941b234f6eb /common/src/leap
parentd1b47b03661be1341cbaf28c2f37663b50ba24f9 (diff)
[refactor] Move constructor, use isinstance
isinstance is better, as kaliy pointed out, and the constructor is also in a safer place on __init__.py to be explicit. Also re-apply a change from last rebase;
Diffstat (limited to 'common/src/leap')
-rw-r--r--common/src/leap/soledad/common/couch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/src/leap/soledad/common/couch.py b/common/src/leap/soledad/common/couch.py
index 90f1a36f..08096f86 100644
--- a/common/src/leap/soledad/common/couch.py
+++ b/common/src/leap/soledad/common/couch.py
@@ -1320,7 +1320,7 @@ class CouchDatabase(CommonBackend):
'converged', at_gen is the insertion/current generation.
:rtype: (str, int)
"""
- if type(doc) is not CouchDocument:
+ if not isinstance(doc, CouchDocument):
doc = self._factory(doc.doc_id, doc.rev, doc.get_json())
self._save_source_info(replica_uid, replica_gen,
replica_trans_id, number_of_docs,