Browse Source

Remove except ImportError's

master
Ricardo Branco 6 years ago
parent
commit
a28b7fab97
1 changed files with 2 additions and 10 deletions
  1. 2
    10
      clean_registry.py

+ 2
- 10
clean_registry.py View File

21
 import sys
21
 import sys
22
 import tarfile
22
 import tarfile
23
 import subprocess
23
 import subprocess
24
+import yaml
25
+import docker
24
 
26
 
25
 from argparse import ArgumentParser
27
 from argparse import ArgumentParser
26
 from distutils.version import LooseVersion
28
 from distutils.version import LooseVersion
30
 from requests import exceptions
32
 from requests import exceptions
31
 from docker.errors import APIError, NotFound, TLSParameterError
33
 from docker.errors import APIError, NotFound, TLSParameterError
32
 
34
 
33
-try:
34
-    import docker
35
-except ImportError:
36
-    error("Please install docker-py with: pip3 install docker")
37
-
38
-try:
39
-    import yaml
40
-except ImportError:
41
-    error("Please install PyYaml with: pip3 install pyyaml")
42
-
43
 VERSION = "1.2"
35
 VERSION = "1.2"
44
 REGISTRY_DIR = "REGISTRY_STORAGE_FILESYSTEM_ROOTREGISTRY_DIR"
36
 REGISTRY_DIR = "REGISTRY_STORAGE_FILESYSTEM_ROOTREGISTRY_DIR"
45
 
37
 

Loading…
Cancel
Save