Update to support OEMCrypto v16 with ODK
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user