From f6597e46a8c3ddfedfb27e4204179556f972320b Mon Sep 17 00:00:00 2001 From: Bernie Hackett Date: Mon, 27 Oct 2014 18:04:53 -0700 Subject: [PATCH] PYTHON-644 - Restore dict.copy() to avoid Jython issues. --- pymongo/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymongo/common.py b/pymongo/common.py index 7e3ddaaa9..9341ed99c 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -709,7 +709,7 @@ class BaseObject(object): if safe is not None or options: if safe or options: if not options: - options = self.__write_concern + options = self.__write_concern.copy() # Backwards compatability edge case. Call getLastError # with no options if safe=True was passed but collection # level defaults have been disabled with w=0. @@ -727,6 +727,6 @@ class BaseObject(object): if self.__write_concern.get('w') == 0: return False, {} elif self.safe or self.__write_concern.get('w', 0) != 0: - return True, self.__write_concern + return True, self.__write_concern.copy() return False, {}