cloudmesh / cloudmesh1

http://cloudmesh.org
Apache License 2.0
14 stars 12 forks source link

safe parameter is removed in pymongo 3+ #205

Open lee212 opened 9 years ago

lee212 commented 9 years ago

pymongo functions need to be updated to manage this change in pymongo 3.0+.

For example, remove() function at ./user/CMUserProviderBaseType.py should be updated without safe parameter. Otherwise you get errors like so:

File "/home/ubuntu/cloudmesh/cloudmesh/user/CMUserProviderBaseType.py", line 79, in remove
    self.db_clouds.remove({"cm_user_id": id}, safe=True)
  File "/home/ubuntu/ENV/local/lib/python2.7/site-packages/pymongo/collection.py", line 1959, in remove
    write_concern = WriteConcern(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'safe'

See the changelog for more detail: http://api.mongodb.org/python/current/changelog.html