Update to support OEMCrypto v16 with ODK

This commit is contained in:
KongQun Yang
2020-09-21 15:54:04 -07:00
parent 93265ab9d1
commit 69d813f0f1
203 changed files with 16337 additions and 2290 deletions

View File

@@ -1,3 +1,4 @@
# Lint as: python2, python3
################################################################################
# Copyright 2017 Google LLC.
#
@@ -7,6 +8,10 @@
################################################################################
"""Class that provides test data for Provisioning SDK testing."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
from certificate_type import CertificateType
@@ -34,11 +39,11 @@ class TestDataProvider(object):
current_dir = os.path.dirname(current_dir)
filename = os.path.join(current_dir, subfolder_path, filename)
try:
with open(filename, 'r') as data_file:
with open(filename, 'rb') as data_file:
data = data_file.read()
return data
except IOError:
print 'TestDataProvider: Failed to read \'%s\'' % filename
print('TestDataProvider: Failed to read \'%s\'' % filename)
return None
@property