* [PATCH] test: test case for changing Call Barring password
@ 2010-12-16 13:12 Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-12-17 1:00 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Sjur =?unknown-8bit?q?Br=C3=A6ndeland?= @ 2010-12-16 13:12 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]
From: Lasse Kunnasluoto <lasse.kunnasluoto@tieto.com>
---
test/test-call-barring | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/test/test-call-barring b/test/test-call-barring
index 5385a10..0756011 100755
--- a/test/test-call-barring
+++ b/test/test-call-barring
@@ -14,6 +14,7 @@ def property_changed(name, value):
def print_useage(s):
print "Usage: %s <property> <newvalue> <password>" % (s)
print "Usage: %s disableall <password>" % (s)
+ print "Usage: %s passwd <old_password> <new_password>" % (s)
sys.exit(1);
if __name__ == "__main__":
@@ -22,6 +23,9 @@ if __name__ == "__main__":
if (sys.argv[1] == 'disableall'):
pin = sys.argv[2]
+ elif (sys.argv[1] == 'passwd'):
+ old_password = sys.argv[2]
+ new_password = sys.argv[3]
else:
if (len(sys.argv) != 4):
print_useage(sys.argv[0])
@@ -59,6 +63,14 @@ if __name__ == "__main__":
except dbus.DBusException, e:
print "Unable to Disable All barrings: ", e
sys.exit(1)
+ elif (sys.argv[1] == 'passwd'):
+ try:
+ cb.ChangePassword(old_password, new_password)
+ except dbus.DBusException, e:
+ print "Unable to change password: ", e
+ sys.exit(1)
+ print "Password changed"
+ sys.exit(0)
else:
try:
cb.SetProperty(property, newvalue, pin)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-17 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 13:12 [PATCH] test: test case for changing Call Barring password Sjur =?unknown-8bit?q?Br=C3=A6ndeland?=
2010-12-17 1:00 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.