Merge lp:~thomir-deactivatedaccount/adt-continuous-deployer/trunk-fix-warning-message into lp:adt-continuous-deployer

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 64
Merged at revision: 64
Proposed branch: lp:~thomir-deactivatedaccount/adt-continuous-deployer/trunk-fix-warning-message
Merge into: lp:adt-continuous-deployer
Diff against target: 51 lines (+18/-19)
1 file modified
mojo.py (+18/-19)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/adt-continuous-deployer/trunk-fix-warning-message
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Review via email: mp+261345@code.launchpad.net

Commit message

Third try and making this warning message work properly.

Description of the change

Third try and making this warning message work properly.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mojo.py'
2--- mojo.py 2015-06-07 22:13:02 +0000
3+++ mojo.py 2015-06-08 05:17:28 +0000
4@@ -165,29 +165,28 @@
5 # If config is on disk, warn the user if they're also specifying
6 # config on the command line, as they might get confused otherwise.
7 deprecated_args = (
8- 'network',
9- 'amqp_uris',
10- 'logstash_host',
11- 'swift_public_url',
12- 'image_mapper_url',
13- 'os_username',
14- 'os_tenant_name',
15- 'os_password',
16- 'os_auth_url',
17- 'os_region_name',
18- 'adt_os_username',
19- 'adt_os_tenant_name',
20- 'adt_os_password',
21- 'adt_os_auth_url',
22- 'adt_os_region_name',
23- 'adt_extra_args',
24- 'adt_http_proxy',
25+ ('amqp_uris', None),
26+ ('logstash_host', None),
27+ ('swift_public_url', None),
28+ ('image_mapper_url', None),
29+ ('os_username', None),
30+ ('os_tenant_name', None),
31+ ('os_password', None),
32+ ('os_auth_url', None),
33+ ('os_region_name', None),
34+ ('adt_os_username', ''),
35+ ('adt_os_tenant_name', ''),
36+ ('adt_os_password', ''),
37+ ('adt_os_auth_url', ''),
38+ ('adt_os_region_name', ''),
39+ ('adt_extra_args', ''),
40+ ('adt_http_proxy', ''),
41 )
42 # argparse Namespace objects are kind of awkward to work with: Can't
43 # find a better way to get namespace contents by varbale name:
44 used_deprepcated = [
45- a for a in deprecated_args
46- if a in args and args.__getattribute__(a) is not None
47+ a for a, d in deprecated_args
48+ if a in args and args.__getattribute__(a) != d
49 ]
50 if used_deprepcated:
51 print("Warning: This mojo spec uses config on disk, but you have")

Subscribers

People subscribed via source and target branches

to all changes: