1
0
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:
Rnhmjoj 2015-03-24 23:45:02 +01:00
parent d799d4b5e7
commit ed0649d659

View File

@ -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'