Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: third_party/oauth2client/django_orm.py

Issue 1094533003: Revert of Upgrade 3rd packages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/oauth2client/devshell.py ('k') | third_party/oauth2client/file.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/oauth2client/django_orm.py
diff --git a/third_party/oauth2client/django_orm.py b/third_party/oauth2client/django_orm.py
index ffbcf92e3aa5dc994a3d5a6c06ddc5a51b4472f2..d54d20c285087afa59b0588d206349decdd31601 100644
--- a/third_party/oauth2client/django_orm.py
+++ b/third_party/oauth2client/django_orm.py
@@ -1,4 +1,4 @@
-# Copyright 2014 Google Inc. All rights reserved.
+# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -116,21 +116,14 @@
credential.set_store(self)
return credential
- def locked_put(self, credentials, overwrite=False):
+ def locked_put(self, credentials):
"""Write a Credentials to the datastore.
Args:
credentials: Credentials, the credentials to store.
- overwrite: Boolean, indicates whether you would like these credentials to
- overwrite any existing stored credentials.
"""
args = {self.key_name: self.key_value}
-
- if overwrite:
- entity, unused_is_new = self.model_class.objects.get_or_create(**args)
- else:
- entity = self.model_class(**args)
-
+ entity = self.model_class(**args)
setattr(entity, self.property_name, credentials)
entity.save()
@@ -138,4 +131,4 @@
"""Delete Credentials from the datastore."""
query = {self.key_name: self.key_value}
- entities = self.model_class.objects.filter(**query).delete()
+ entities = self.model_class.objects.filter(**query).delete()
« no previous file with comments | « third_party/oauth2client/devshell.py ('k') | third_party/oauth2client/file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698