From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 4/4] test: Update with RequestQuickDigit API
Date: Thu, 30 Aug 2012 17:05:17 -0500 [thread overview]
Message-ID: <503FE39D.2020505@gmail.com> (raw)
In-Reply-To: <1346160082-11077-5-git-send-email-philippe.nunes@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2321 bytes --]
Hi Philippe,
On 08/28/2012 08:21 AM, Philippe Nunes wrote:
> ---
> test/test-stk-menu | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
Applying: test: Update with RequestQuickDigit API
/home/denkenz/ofono-master/.git/rebase-apply/patch:45: trailing whitespace.
print "Single key press (t, b, 0-9,*,#)"
/home/denkenz/ofono-master/.git/rebase-apply/patch:53: trailing whitespace.
print "."
fatal: 2 lines add whitespace errors.
Patch failed at 0001 test: Update with RequestQuickDigit API
> diff --git a/test/test-stk-menu b/test/test-stk-menu
> index a9f92e8..476d949 100755
> --- a/test/test-stk-menu
> +++ b/test/test-stk-menu
> @@ -7,6 +7,27 @@ import dbus
> import dbus.service
> import dbus.mainloop.glib
>
> +
> +
Why double empty line?
> +class _GetchUnix:
> + def __init__(self):
> + import tty, sys
> +
> + def __call__(self):
> + import sys, tty, termios
> + fd = sys.stdin.fileno()
> + old_settings = termios.tcgetattr(fd)
> + try:
> + tty.setraw(sys.stdin.fileno())
> + ch = sys.stdin.read(1)
> + finally:
> + termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
> + return ch
> +
> +
> +getch = _GetchUnix()
> +
> +
And again?
Also, are you sure we need to go this complicated. We already ignore
'hide_typing' elsewhere...
> class GoBack(dbus.DBusException):
> _dbus_error_name = "org.ofono.Error.GoBack"
>
> @@ -127,6 +148,22 @@ class StkAgent(dbus.service.Object):
> return key
>
> @dbus.service.method("org.ofono.SimToolkitAgent",
> + in_signature="sy", out_signature="s")
> + def RequestQuickDigit(self, title, icon):
> + print "Title: (%s)" % (title)
> + print "Icon: (%d)" % (icon)
> + print "Single key press (t, b, 0-9,*,#)"
> + key = getch();
> +
> + if key == 'b':
> + raise GoBack("User wishes to go back");
> + elif key == 't':
> + raise EndSession("User wishes to terminate session");
> + else:
> + print "."
> + return key
> +
> + @dbus.service.method("org.ofono.SimToolkitAgent",
> in_signature="sy", out_signature="b")
> def RequestConfirmation(self, title, icon):
> print "Title: (%s)" % (title)
Regards,
-Denis
prev parent reply other threads:[~2012-08-30 22:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 13:21 [PATCH v2 0/4] Immediate digit response Philippe Nunes
2012-08-28 13:21 ` [PATCH v2 1/4] doc: Add new STK Agent API to get digit response on single key press Philippe Nunes
2012-08-30 21:58 ` Denis Kenzior
2012-08-28 13:21 ` [PATCH v2 2/4] stkagent: Add new " Philippe Nunes
2012-08-30 22:00 ` Denis Kenzior
2012-08-28 13:21 ` [PATCH v2 3/4] stk: Ask for immediate digit response if specified by command qualifier Philippe Nunes
2012-08-30 22:02 ` Denis Kenzior
2012-08-28 13:21 ` [PATCH v2 4/4] test: Update with RequestQuickDigit API Philippe Nunes
2012-08-30 22:05 ` Denis Kenzior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=503FE39D.2020505@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.