mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Change process title for more clarity when running multiple python progs
This commit is contained in:
parent
690b904b98
commit
764cf6e62e
1 changed files with 10 additions and 0 deletions
10
SickBeard.py
10
SickBeard.py
|
@ -180,6 +180,16 @@ def main():
|
|||
# Need console logging for SickBeard.py and SickBeard-console.exe
|
||||
consoleLogging = (not hasattr(sys, "frozen")) or (sickbeard.MY_NAME.lower().find('-console') > 0)
|
||||
|
||||
# Attempt to rename the process for easier debugging
|
||||
try:
|
||||
from setproctitle import setproctitle
|
||||
except ImportError:
|
||||
if consoleLogging:
|
||||
sys.stderr.write(u"setproctitle module is not available.\n")
|
||||
setproctitle = lambda t: None
|
||||
|
||||
setproctitle(sickbeard.MY_NAME)
|
||||
|
||||
# Rename the main thread
|
||||
threading.currentThread().name = "MAIN"
|
||||
|
||||
|
|
Loading…
Reference in a new issue