diff options
Diffstat (limited to 'source4/scripting/python')
-rwxr-xr-x | source4/scripting/python/samba_external/missing.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source4/scripting/python/samba_external/missing.py b/source4/scripting/python/samba_external/missing.py index 50bda65a21..082afd8397 100755 --- a/source4/scripting/python/samba_external/missing.py +++ b/source4/scripting/python/samba_external/missing.py @@ -2,11 +2,17 @@ # work out what python external libraries we need to install +external_libs = { + "dns.resolver": "dnspython", + "subunit": "subunit", + "testtools": "testtools"} + list = [] -try: - import dns.resolver -except: - list.append("dnspython") +for module, package in external_libs.iteritems(): + try: + __import__(module) + except ImportError: + list.append(package) print ' '.join(list) |