| ★ wanayoo — archive 1999 https://github.com/saltstack/salt/pull/13704 | Nouvelle recherche | Portail wanayoo |
|
|
cvrebert |
modules.lxc.init(): rename exists=>does_exist to avoid shadowing
…
************* Module salt.modules.lxc salt/modules/lxc.py:794: [W0621(redefined-outer-name), init] Redefining name 'exists' from outer scope (line 1469) |
796e47a
|
Test PASSed.
Refer to this link for build results: http://jenkins.saltstack.com/job/salt-pr-build/5485/
Showing 1 unique commit by 1 author.
| Jun 24, 2014 | ||||
|---|---|---|---|---|
|
|
cvrebert |
modules.lxc.init(): rename exists=>does_exist to avoid shadowing
…
************* Module salt.modules.lxc salt/modules/lxc.py:794: [W0621(redefined-outer-name), init] Redefining name 'exists' from outer scope (line 1469) |
796e47a
|
|
Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats
| @@ -791,10 +791,10 @@ def select(k, default=None): | ||
| 791 | 791 | clone_from = get_base(vgname=vgname, **kwargs) |
| 792 | 792 | if not kwargs.get('snapshot') is False: |
| 793 | 793 | kwargs['snapshot'] = True |
| 794 | - exists = __salt__['lxc.exists'](name) | |
| 794 | + does_exist = __salt__['lxc.exists'](name) | |
| 795 | 795 | to_reboot = False |
| 796 | 796 | remove_seed_marker = False |
| 797 | - if exists: | |
| 797 | + if does_exist: | |
| 798 | 798 | comment += 'Container already exists\n' |
| 799 | 799 | elif clone_from: |
| 800 | 800 | remove_seed_marker = True |
| @@ -868,9 +868,9 @@ def select(k, default=None): | ||
| 868 | 868 | comment += 'Container created\n' |
| 869 | 869 | ret[inner] = True |
| 870 | 870 | if ( |
| 871 | - not exists | |
| 871 | + not does_exist | |
| 872 | 872 | or ( |
| 873 | - exists | |
| 873 | + does_exist | |
| 874 | 874 | and __salt__['lxc.state'](name) != 'running' |
| 875 | 875 | ) |
| 876 | 876 | ): |
Tip: You can add notes to lines in a file. Hover to the left of a line to make a note