Merge lp:~brendan-donegan/checkbox/bug1013537_nmcli_con_up_return_code into lp:checkbox
Proposed by
Brendan Donegan
Status: | Merged |
---|---|
Merged at revision: | 1439 |
Proposed branch: | lp:~brendan-donegan/checkbox/bug1013537_nmcli_con_up_return_code |
Merge into: | lp:checkbox |
Diff against target: |
25 lines (+3/-1) 2 files modified
debian/changelog (+2/-0) scripts/create_connection (+1/-1) |
To merge this branch: | bzr merge lp:~brendan-donegan/checkbox/bug1013537_nmcli_con_up_return_code |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marc Tardif (community) | Approve | ||
Brendan Donegan (community) | Needs Resubmitting | ||
Review via email: mp+110486@code.launchpad.net |
Description of the change
Originally, after calling nmcli con up the script was looking at its output to check for a string to confirm the connection was activated. In Quantal it has no output, so we need to check the return code. Note that I have not used subprocess.call, because that ends up spitting out all of the messages when run in Precise. Instead I do communicate and discard stdout, and then check the returncode property of Popen
To post a comment you must log in.
Also, I could have used 'if !nmcli_ con_up. returncode' , but I hate to use negation in a situation where I'm checking for success.