mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
Use builtin /dev/null pipe
This commit is contained in:
parent
d799d4b5e7
commit
ed0649d659
@ -427,11 +427,12 @@ def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.transmission:
|
||||
with open('/dev/null') as dn:
|
||||
ret = subprocess.call(['transmission-remote', '-l'], stdout=dn, stderr=dn)
|
||||
if ret != 0:
|
||||
print('Transmission is not running.')
|
||||
return
|
||||
ret = subprocess.call(['transmission-remote', '-l'],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL)
|
||||
if ret != 0:
|
||||
print('Transmission is not running.')
|
||||
return
|
||||
|
||||
if args.list_categories:
|
||||
cur_color = 'zebra_0'
|
||||
|
Loading…
Reference in New Issue
Block a user