KBNLresearch / iromlab

Loader software for automated imaging of optical media with Nimbie disc robot
Apache License 2.0
31 stars 5 forks source link

Temporary log files not written to tempDir #33

Closed bitsgalore closed 7 years ago

bitsgalore commented 7 years ago

Applies to all wrapper modules. Solution is to change this:

logFile = ''.join([config.tempDir,shared.randomString(12),".log"])

into:

logFile = os.path.join(config.tempDir,shared.randomString(12) + ".log")
WillemJan commented 7 years ago

Why not use os.tmpfile() and let the os do the moppig for you?

Anyhoe my 5 cents ;)

Johan van der Knijff schreef op 2017-02-24 15:25:

Applies to all wrapper modules. Solution is to change this:

logFile = ''.join([config.tempDir,shared.randomString(12),".log"])

into:

logFile = os.path.join(config.tempDir,shared.randomString(12),".log")

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].

*

Links:

[1] https://github.com/KBNLresearch/iromlab/issues/33 [2] https://github.com/notifications/unsubscribe-auth/AAP8SsSXufq20DAM8TZRor59E97nffvuks5rfuhwgaJpZM4MLQoN

bitsgalore commented 7 years ago

Good thinking, but apparently on Windows os.tmpfile() only works if the script is run as admin:

http://stackoverflow.com/questions/7807855/os-tmpfile-doesnt-work-under-windows

As this software will only be run under Windows (and most likely not as admin) I'd rather not use this.

WillemJan commented 7 years ago

some osses I never got the gist of ;)

Johan van der Knijff schreef op 2017-02-24 17:53:

Good thinking, but apparently on Windows os.tmpfile() only works if the script is run as admin:

http://stackoverflow.com/questions/7807855/os-tmpfile-doesnt-work-under-windows

As this software will only be run under Windows (and most likely not as admin) I'd rather not use this.

-- You are receiving this because you commented. Reply to this email directly, view it on GitHub [1], or mute the thread [2].

*

Links:

[1] https://github.com/KBNLresearch/iromlab/issues/33#issuecomment-282342541 [2] https://github.com/notifications/unsubscribe-auth/AAP8SlshY_rKFV5GUjlqhSpOK_ulAyfmks5rfwsNgaJpZM4MLQoN

bitsgalore commented 7 years ago

Fixed: https://github.com/KBNLresearch/iromlab/commit/a0cb88c0bd4e7b399a9b34eef730de8086bd502c