signing: replace deprecated configparser readfp API
Python 3 has renamed this to read_file, so update our code to match.
BUG=None
TEST=`cros lint` is clean
Change-Id: I45d4cb6c6f9e7234b4433f5e77ac9e2c88a704d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2189567
Reviewed-by: George Engelbrecht <engeg@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/pushimage.py b/scripts/pushimage.py
index 752d7dd..85cfe4e 100644
--- a/scripts/pushimage.py
+++ b/scripts/pushimage.py
@@ -93,7 +93,7 @@
config = configparser.ConfigParser()
with open(self.GetInsnFile('DEFAULT')) as fp:
- config.readfp(fp)
+ config.read_file(fp)
# What pushimage internally refers to as 'recovery', are the basic signing
# instructions in practice, and other types are stacked on top.
@@ -105,7 +105,7 @@
# This board doesn't have any signing instructions.
raise MissingBoardInstructions(self.board, image_type, input_insns)
with open(input_insns) as fp:
- config.readfp(fp)
+ config.read_file(fp)
if image_type is not None:
input_insns = self.GetInsnFile(image_type)
@@ -115,7 +115,7 @@
self.image_type = image_type
with open(input_insns) as fp:
- config.readfp(fp)
+ config.read_file(fp)
self.cfg = config
@@ -209,7 +209,7 @@
# Create a new ConfigParser from the serialized data.
ret = configparser.ConfigParser()
- ret.readfp(data)
+ ret.read_file(data)
return ret