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

Unified Diff: test/mm-disconnect

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, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mm-disable ('k') | test/mm-enable » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mm-disconnect
diff --git a/test/mm-disconnect b/test/mm-disconnect
index 60e97865eb6fbe51ac3a01faa2026c14b625758e..7cc89758046cd6ae0323f60f9085df499d4a959e 100755
--- a/test/mm-disconnect
+++ b/test/mm-disconnect
@@ -1,5 +1,9 @@
#!/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 mm
import dbus
import dbus.mainloop.glib
@@ -14,7 +18,7 @@ def state_changed(old_state, new_state, reason, path):
else:
print "Disconnect failed for", path
waitcnt -= 1
- if waitcnt <= 0:
+ if waitcnt <= 0:
mainloop.quit()
waitflag = False
@@ -24,18 +28,17 @@ if len(sys.argv) > 1 and sys.argv[1] == '-w':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-manager = mm.ModemManager()
-
if waitflag:
bus = dbus.SystemBus()
bus.add_signal_receiver(state_changed,
- bus_name="org.chromium.ModemManager",
+ bus_name=manager.provider,
signal_name="StateChanged",
path_keyword="path")
-devices = manager.manager.EnumerateDevices()
+devices = mm.EnumerateDevices()
+
+for manager, path in devices:
-for path in devices:
print "Disconnecting", path
modem = manager.Modem(path)
« no previous file with comments | « test/mm-disable ('k') | test/mm-enable » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698