blob: b928bc7f29a665df9cb3e4fb608976ac0ad31e9c [file] [log] [blame]
#!/usr/bin/python
# Copyright (c) 2011 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.
import dbus
import mm
import sys
def Usage(prog):
print ("Usage: %s spc "
"<device path substring>") % prog
if len(sys.argv) < 2 or len(sys.argv) > 3:
Usage(sys.argv[0])
sys.exit(1)
spc = sys.argv[1]
if len(sys.argv) < 3:
modem_pattern = ''
else:
modem_pattern = sys.argv[2]
manager, path = mm.PickOneModem(modem_pattern)
modem = manager.Modem(path)
modem.FactoryReset(spc)