[Cryptech-Commits] [sw/stm32] branch python3 updated: ..Aaaand a few more Python3 string bugs in cryptech_upload

git at cryptech.is git at cryptech.is
Tue Sep 1 21:24:10 UTC 2020


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch python3
in repository sw/stm32.

The following commit(s) were added to refs/heads/python3 by this push:
     new 646454d  ..Aaaand a few more Python3 string bugs in cryptech_upload
646454d is described below

commit 646454d4264ae27769cb20f31f31eb7cb0b9a908
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Tue Sep 1 17:25:53 2020 -0400

    ..Aaaand a few more Python3 string bugs in cryptech_upload
---
 projects/hsm/cryptech_upload | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/projects/hsm/cryptech_upload b/projects/hsm/cryptech_upload
index 42e20ee..b40427d 100755
--- a/projects/hsm/cryptech_upload
+++ b/projects/hsm/cryptech_upload
@@ -169,7 +169,7 @@ class ManagementPortAbstract(object):
         prompt = self.read()
         #if prompt.endswith("This is the bootloader speaking..."):
         #    prompt = self.read()
-        if prompt.endswith("Username: "):
+        if prompt.endswith(b"Username: "):
             self.write(self.args.username.encode("ascii") + b"\r")
             prompt = self.read()
             if prompt.endswith(b"Password: "):
@@ -180,7 +180,7 @@ class ManagementPortAbstract(object):
         if not prompt.endswith((b"> ", b"# ")):
             print("Device does not seem to be ready for a file transfer (got {!r})".format(prompt))
             return prompt
-        self.write(cmd.encode("ascii") + b"\r")
+        self.write(cmd + b"\r")
         response = self.read()
         return response
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list