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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.transmission:
|
if args.transmission:
|
||||||
with open('/dev/null') as dn:
|
ret = subprocess.call(['transmission-remote', '-l'],
|
||||||
ret = subprocess.call(['transmission-remote', '-l'], stdout=dn, stderr=dn)
|
stdout=subprocess.DEVNULL,
|
||||||
if ret != 0:
|
stderr=subprocess.DEVNULL)
|
||||||
print('Transmission is not running.')
|
if ret != 0:
|
||||||
return
|
print('Transmission is not running.')
|
||||||
|
return
|
||||||
|
|
||||||
if args.list_categories:
|
if args.list_categories:
|
||||||
cur_color = 'zebra_0'
|
cur_color = 'zebra_0'
|
||||||
|
Loading…
Reference in New Issue
Block a user