[LyX/master] ePub: comment about subprocess.run instead of os.system to simplify code.
Thibaut Cuvelier
tcuvelier at lyx.org
Sun Feb 7 05:32:50 UTC 2021
commit 0b50da7321a942b58142ff4256b5102922411b08
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Sun Feb 7 06:35:42 2021 +0100
ePub: comment about subprocess.run instead of os.system to simplify code.
---
lib/scripts/docbook2epub.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/scripts/docbook2epub.py b/lib/scripts/docbook2epub.py
index da2fbf9..9354b83 100644
--- a/lib/scripts/docbook2epub.py
+++ b/lib/scripts/docbook2epub.py
@@ -51,6 +51,7 @@ if __name__ == '__main__':
# On Windows, it is typical to have spaces in folder names, and that requires to wrap the whole command
# in quotes. On Linux, this might create errors when starting the command.
quoted_command = '"' + command + '"'
+ # This could be simplified by using subprocess.run, but this requires Python 3.5.
if os.system(quoted_command) != 0:
print('docbook2epub fails')
More information about the lyx-cvs
mailing list