★ wanayoo — archive 1999 https://github.com/saltstack/salt/pull/13704Nouvelle recherche | Portail wanayoo
Skip to content
This repository

modules.lxc.init(): rename exists=>does_exist to avoid shadowing #13704

Merged
merged 1 commit into from 22 days ago

3 participants

Chris Rebert SaltStack Jenkins Thomas S Hatch
Chris Rebert
************* Module salt.modules.lxc
salt/modules/lxc.py:794: [W0621(redefined-outer-name), init] Redefining name 'exists' from outer scope (line 1469)
Chris Rebert 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
SaltStack Jenkins
Collaborator

Test PASSed.
Refer to this link for build results: http://jenkins.saltstack.com/job/salt-pr-build/5485/

Thomas S Hatch thatch45 merged commit 591efba into from
Thomas S Hatch thatch45 closed this
Chris Rebert cvrebert deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jun 24, 2014
Chris Rebert 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
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 −4 salt/modules/lxc.py
8 salt/modules/lxc.py
@@ -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

Something went wrong with that request. Please try again.