mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Change process title for more clarity when running multiple python progs
This commit is contained in:
parent
690b904b98
commit
764cf6e62e
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 New Issue
Block a user