Some code cleanup (removed unused variables and imports)
This commit is contained in:
parent
34c4e0d495
commit
8658b82de7
1 changed files with 2 additions and 6 deletions
|
@ -355,15 +355,14 @@ HAS_DOCKER_PY = True
|
|||
|
||||
import sys
|
||||
import json
|
||||
import re
|
||||
import os
|
||||
import shlex
|
||||
from urlparse import urlparse
|
||||
try:
|
||||
import docker.client
|
||||
import docker.utils
|
||||
from requests.exceptions import *
|
||||
except ImportError, e:
|
||||
from requests.exceptions import RequestException
|
||||
except ImportError:
|
||||
HAS_DOCKER_PY = False
|
||||
|
||||
if HAS_DOCKER_PY:
|
||||
|
@ -1116,7 +1115,6 @@ class DockerManager(object):
|
|||
for i in self.client.containers(all=True):
|
||||
running_image = i['Image']
|
||||
running_command = i['Command'].strip()
|
||||
match = False
|
||||
|
||||
if name:
|
||||
matches = name in i.get('Names', [])
|
||||
|
@ -1448,7 +1446,6 @@ def main():
|
|||
manager = DockerManager(module)
|
||||
count = int(module.params.get('count'))
|
||||
name = module.params.get('name')
|
||||
image = module.params.get('image')
|
||||
pull = module.params.get('pull')
|
||||
|
||||
state = module.params.get('state')
|
||||
|
@ -1469,7 +1466,6 @@ def main():
|
|||
manager.pull_image()
|
||||
|
||||
containers = ContainerSet(manager)
|
||||
failed = False
|
||||
|
||||
if state == 'present':
|
||||
present(manager, containers, count, name)
|
||||
|
|
Loading…
Reference in a new issue