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,6 +21,8 @@ import re
21 21
 import sys
22 22
 import tarfile
23 23
 import subprocess
24
+import yaml
25
+import docker
24 26
 
25 27
 from argparse import ArgumentParser
26 28
 from distutils.version import LooseVersion
@@ -30,16 +32,6 @@ from shutil import rmtree
30 32
 from requests import exceptions
31 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 35
 VERSION = "1.2"
44 36
 REGISTRY_DIR = "REGISTRY_STORAGE_FILESYSTEM_ROOTREGISTRY_DIR"
45 37
 

Loading…
Cancel
Save