Skip to content

Commit

Permalink
Catch import errors as per @urbonegi's suggestion
Browse files Browse the repository at this point in the history
Change-Id: I9c010847d3b14e10d8c2f7946a3164f44011c9d0
  • Loading branch information
jrha committed Jun 28, 2018
1 parent 185c8e7 commit 59ece30
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/aquilon/worker/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@

DSDB_ENABLED = config.getboolean("dsdb", "enable")

if DSDB_ENABLED:
# FIXME - this needs to be moved to depends.py after
# refactoring runtests.py and Config to allow override
# sys.path for python modules when running tests
# DSDB python client
try:
import ms.version
except ImportError:
pass
else:
ms.version.addpkg('setuptools', '0.6c11')
ms.version.addpkg("requests", "2.7.0")
ms.version.addpkg("requests-kerberos", "0.5-ms2")
ms.version.addpkg("kerberos", "1.1.5")
ms.version.addpkg("dns", "1.10.0")
ms.version.addpkg('ms.dsdb', '6.0.30')
if DSDB_ENABLED:
import ms.dsdb.client

# subprocess.Popen is not thread-safe in Python 2, so we need locking
Expand Down Expand Up @@ -1078,4 +1079,4 @@ def build_mako_lookup(config, kind, **kwargs):
return TemplateLookup(directories=directories, **kwargs)


DSDBRunner.snapshot_handlers['rack'] = DSDBRunner.snapshot_rack
DSDBRunner.snapshot_handlers['rack'] = DSDBRunner.snapshot_rack

0 comments on commit 59ece30

Please sign in to comment.