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

Unified Diff: chrome/browser/policy/test/policy_testserver.py

Issue 1735863002: Revert "Revert of Reland: No longer start up profile if there was an error fetching policy. (patchs… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: chrome/browser/policy/test/policy_testserver.py
diff --git a/chrome/browser/policy/test/policy_testserver.py b/chrome/browser/policy/test/policy_testserver.py
index 480124cf9414b512973030fcf899a6ca1242ce67..c7f933dd082ab81562dce20ec1e5048011174601 100644
--- a/chrome/browser/policy/test/policy_testserver.py
+++ b/chrome/browser/policy/test/policy_testserver.py
@@ -376,6 +376,8 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return (403, 'No authorization')
policy = self.server.GetPolicies()
+ if ('managed_users' not in policy):
+ return (500, 'error in config - no managed users')
username = self.server.ResolveUser(auth)
if ('*' not in policy['managed_users'] and
username not in policy['managed_users']):
@@ -990,7 +992,7 @@ class PolicyTestServer(testserver_base.BrokenPipeHandlerMixIn,
pass
def GetPolicies(self):
- """Returns the policies to be used, reloaded form the backend file every
+ """Returns the policies to be used, reloaded from the backend file every
time this is called.
"""
policy = {}

Powered by Google App Engine
This is Rietveld 408576698