Documentation | waf: Fix singlehtml output (!104)

ita2048 ita2048 (@ita2048) gitlab at rtems.org
Mon Feb 10 19:48:27 UTC 2025



ita2048 ita2048 commented on a discussion: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/merge_requests/104#note_119604


`os.popen` is an alias for `subprocess.Popen(cmd, shell=True, text=True, stdout=subprocess.PIPE, bufsize=-1)`. Both `os.popen` and `task.exec_command` call `Popen.communicate()` and wait for the process to terminate.

The main differences that the changes bring is the removal of  `stderr` and setting `text=True`.  Unless setting a standard error causes an issue, passing `task.exec_command(cmd, stdout = so, stderr = se, text=True)` should have the same effect.

Alternatively, the output files may need to be opened in binary mode `so = open(tgt, 'wb')` instead of text mode `so = open(tgt, 'w')`.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/docs/rtems-docs/-/merge_requests/104#note_119604
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250210/8a802236/attachment.htm>


More information about the bugs mailing list