gromero commented on a change in pull request #9584:
URL: https://github.com/apache/tvm/pull/9584#discussion_r758745168



##########
File path: apps/microtvm/arduino/template_project/microtvm_api_server.py
##########
@@ -248,7 +249,10 @@ def _convert_includes(self, project_dir, source_dir):
         for ext in ("c", "h", "cpp"):
             for filename in source_dir.rglob(f"*.{ext}"):
                 with filename.open() as file:
-                    lines = file.readlines()
+                    try:
+                        lines = file.readlines()
+                    except:

Review comment:
       @mehrdadh OK. So what I suggest is to catch that exception specifically 
(`except UnicodeDecodeError:`) and add a comment like a TODO() explaning that 
we don't get this error on Arduino tests and that needs further investigation. 
Also since iirc the linter will consider it (not catching a specific exception) 
an anti-pattern and complain.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to