Merge lp:~kissiel/checkbox/fix-1468531-broken-root-in-cbt into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 3864
Merged at revision: 3868
Proposed branch: lp:~kissiel/checkbox/fix-1468531-broken-root-in-cbt
Merge into: lp:checkbox
Diff against target: 19 lines (+8/-1)
1 file modified
checkbox-touch/components/CheckboxTouchApplication.qml (+8/-1)
To merge this branch: bzr merge lp:~kissiel/checkbox/fix-1468531-broken-root-in-cbt
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+263432@code.launchpad.net

Description of the change

This MR makes logic responsible for calling remember_password on the python
side to use new PythonObjectRef instead of 'handle' approach that's missing
now.

25ae8c8 checkbox-touch: make remember_password use new pyref approach

To post a comment you must log in.
Revision history for this message
Chris Wayne (cwayne) wrote :

Tested this with my provider using user:root, and it works now! So LGTM

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1,

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-touch/components/CheckboxTouchApplication.qml'
2--- checkbox-touch/components/CheckboxTouchApplication.qml 2015-05-27 06:51:23 +0000
3+++ checkbox-touch/components/CheckboxTouchApplication.qml 2015-06-30 22:25:39 +0000
4@@ -152,7 +152,14 @@
5
6 function rememberPassword(password, continuation) {
7 // using low-level py.call() to 'silently' pass password string through pyotherside
8- py.call("py_invoke", [handle, "remember_password", [password]], continuation);
9+ var callable = py.getattr(object, "remember_password");
10+ if (!callable) {
11+ console.error("Unable to invoke remember_password!");
12+ throw "trying to invoke not existing method";
13+ }
14+ py.call(callable, [password], function(response) {
15+ continuation(response);
16+ });
17 }
18
19 // A wrapper around invoke() that works with the @view decorator. The fn_ok

Subscribers

People subscribed via source and target branches