diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-08-20 14:47:14 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-08-26 17:20:22 -0300 |
commit | de73fc6969433a69ec6ba12ec508c3c93b83fcc6 (patch) | |
tree | 04feebed061697c212e7e07858c31941b234f6eb /common/src | |
parent | d1b47b03661be1341cbaf28c2f37663b50ba24f9 (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')
-rw-r--r-- | common/src/leap/soledad/common/couch.py | 2 |
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, |