Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(947)

Side by Side Diff: test/mm-register

Issue 6731056: Update to test scripts to work with both ModemManager and Cromo (Closed) Base URL: ssh://gitrw.chromium.org:9222/flimflam.git@master
Patch Set: Fix review comments Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/mm-poll-signal-strength ('k') | test/mm-reset » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
3 import dbus 7 import dbus
4 import mm 8 import mm
5 import sys 9 import sys
6 10
7 manager = mm.ModemManager() 11 devices = mm.EnumerateDevices()
8
9 devices = manager.manager.EnumerateDevices()
10 12
11 network = "" 13 network = ""
12 14
13 if len(sys.argv) > 1: 15 if len(sys.argv) > 1:
14 network = sys.argv[1] 16 network = sys.argv[1]
15 17
16 for path in devices: 18 for manager, path in devices:
17 19
18 props = manager.Properties(path) 20 props = manager.Properties(path)
19 21
20 if props['Type'] == mm.ModemManager.GSM_MODEM: 22 if props['Type'] == mm.ModemManager.GSM_MODEM:
21 print 'Path: %s' % path 23 print 'Path: %s' % path
22 print '' 24 print ''
23 25
24 gsm_network = manager.GsmNetwork(path) 26 gsm_network = manager.GsmNetwork(path)
25 gsm_network.Register("") 27 gsm_network.Register("")
OLDNEW
« no previous file with comments | « test/mm-poll-signal-strength ('k') | test/mm-reset » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698