Always redirect stdout/stderr to file if application is frozen

This will make stdout/stderr also redirect to file if we are running a
build on OSX or Linux.
This commit is contained in:
Arjen Hiemstra 2017-05-24 15:46:28 +02:00
parent 3ff9ad5d4e
commit 1c620ac621

View file

@ -53,7 +53,7 @@ import Arcus #@UnusedImport
import cura.CuraApplication
import cura.Settings.CuraContainerRegistry
if Platform.isWindows() and hasattr(sys, "frozen"):
if hasattr(sys, "frozen"):
dirpath = os.path.expanduser("~/AppData/Local/cura/")
os.makedirs(dirpath, exist_ok = True)
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")