blob: 98ea0b897ac6ab4b9a5374b570995534246cc7b7 [file] [log] [blame]
#!/usr/bin/env python3
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import pprint
import sys
import flimflam
flim = flimflam.FlimFlam()
if len(sys.argv) < 2:
print('Usage: %s <service_name>' % (sys.argv[0]))
sys.exit(1)
service = flim.FindElementByProperty('Service', 'Name', sys.argv[1])
if not service:
print('Could not find service: %s' % (sys.argv[1]))
sys.exit(1)
pprint.pprint(flim.DisconnectService(service))