mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Allow passing absolute nice command. #1619
This commit is contained in:
parent
41bbb45e4c
commit
5aadbe6945
1 changed files with 4 additions and 1 deletions
|
@ -456,6 +456,9 @@ def configure_niceness():
|
|||
with open(os.devnull, 'w') as devnull:
|
||||
try:
|
||||
subprocess.Popen(['nice'], stdout=devnull, stderr=devnull).communicate()
|
||||
if len(CFG['Posix']['niceness'].split(',')) > 1: #Allow passing of absolute command, not just value.
|
||||
NICENESS.extend(CFG['Posix']['niceness'].split(','))
|
||||
else:
|
||||
NICENESS.extend(['nice', '-n{0}'.format(int(CFG['Posix']['niceness']))])
|
||||
except Exception:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue