This is an automated email from the ASF dual-hosted git repository.

junrushao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 3f304c8bc5 [microTVM] Arduino: Fix f-strings on flash warning/error 
messages (#12175)
3f304c8bc5 is described below

commit 3f304c8bc58910a7ef19c9c0b00a7df9ae23e614
Author: Gustavo Romero <[email protected]>
AuthorDate: Wed Aug 3 23:32:29 2022 -0300

    [microTVM] Arduino: Fix f-strings on flash warning/error messages (#12175)
    
    This commit fixes two f-strings on flash timeout exception and runtime
    error so the proper variables (like port, number of retries, and timeout
    value) are correctly printed to the warning / error messages.
    
    Signed-off-by: Gustavo Romero <[email protected]>
---
 apps/microtvm/arduino/template_project/microtvm_api_server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/microtvm/arduino/template_project/microtvm_api_server.py 
b/apps/microtvm/arduino/template_project/microtvm_api_server.py
index 62b1943143..46b717fba4 100644
--- a/apps/microtvm/arduino/template_project/microtvm_api_server.py
+++ b/apps/microtvm/arduino/template_project/microtvm_api_server.py
@@ -495,12 +495,12 @@ class Handler(server.ProjectAPIHandler):
             # be caught.
             except subprocess.TimeoutExpired:
                 _LOG.warning(
-                    "Upload attempt to port {port} timed out after 
{self.FLASH_TIMEOUT_SEC} seconds"
+                    f"Upload attempt to port {port} timed out after 
{self.FLASH_TIMEOUT_SEC} seconds"
                 )
 
         else:
             raise RuntimeError(
-                "Unable to flash Arduino board after {self.FLASH_MAX_RETRIES} 
attempts"
+                f"Unable to flash Arduino board after {self.FLASH_MAX_RETRIES} 
attempts"
             )
 
     def open_transport(self, options):

Reply via email to