diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2019-06-06 12:42:14 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2019-06-06 12:43:14 +0300 |
commit | 280ddea1aec84f1973d57fec9f564059f0ba4445 (patch) | |
tree | de719498f14e55459be258a1405b4d2960f28e15 /cura_app.py | |
parent | 81919b75df903b6e649b3eb70f8d10a5fc299708 (diff) |
Do not redirect stdout and stderr for CLI
CURA-6549
Diffstat (limited to 'cura_app.py')
-rwxr-xr-x | cura_app.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cura_app.py b/cura_app.py index 1978e0f5fd..2b2accbbb6 100755 --- a/cura_app.py +++ b/cura_app.py @@ -32,7 +32,8 @@ if not known_args["debug"]: elif Platform.isOSX(): return os.path.expanduser("~/Library/Logs/" + CuraAppName) - if hasattr(sys, "frozen"): + # Do not redirect stdout and stderr to files if we are running CLI. + if hasattr(sys, "frozen") and "cli" in os.path.basename(sys.argv[0]).lower(): dirpath = get_cura_dir_path() os.makedirs(dirpath, exist_ok = True) sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w", encoding = "utf-8") |