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 185296c137febd111c283f96cdcedbff81f97045..c8e1342f7fc46baa593060adb8e0e8357c6e85a5 100644 |
--- a/chrome/browser/policy/test/policy_testserver.py |
+++ b/chrome/browser/policy/test/policy_testserver.py |
@@ -79,6 +79,7 @@ except ImportError: |
try: |
import json |
except ImportError: |
+ logging.error('Could not import json') |
Mattias Nissler (ping if slow)
2015/05/18 13:29:17
I think it's meanwhile fine to just import json un
|
json = None |
import asn1der |
@@ -91,12 +92,14 @@ import cloud_policy_pb2 as cp |
try: |
import chrome_extension_policy_pb2 as ep |
except ImportError: |
+ logging.error('Could not import chrome_extension_policy_pb2') |
Mattias Nissler (ping if slow)
2015/05/18 13:29:17
This will add log spew I guess. A better way of do
|
ep = None |
# Device policy is only available on Chrome OS builds. |
try: |
import chrome_device_policy_pb2 as dp |
except ImportError: |
+ logging.error('Could not import chrome_device_policy_pb2') |
dp = None |
# ASN.1 object identifier for PKCS#1/RSA. |
@@ -986,12 +989,12 @@ class PolicyTestServer(testserver_base.BrokenPipeHandlerMixIn, |
""" |
policy = {} |
if json is None: |
- print 'No JSON module, cannot parse policy information' |
+ logging.error('No JSON module, cannot parse policy information') |
else : |
try: |
policy = json.loads(open(self.policy_path).read(), strict=False) |
except IOError: |
- print 'Failed to load policy from %s' % self.policy_path |
+ logging.error('Failed to load policies from %s' % self.policy_path) |
return policy |
def RegisterDevice(self, device_id, machine_id, type): |