Skip to content

Commit 7b48624

Browse files
committed
Ignore the case where stash-cache isn't installed
1 parent a106618 commit 7b48624

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

osgtest/tests/test_155_stashcache.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@
9797

9898
XROOTD_ORIGIN_CFG_PATH = "/etc/xrootd/xrootd-stash-origin.cfg"
9999
HTTP_CFG_PATH = "/etc/xrootd/config.d/40-osg-http.cfg"
100-
if core.PackageVersion('stash-cache') >= '1.1.0':
101-
CACHING_PLUGIN_CFG_PATH = "/etc/xrootd/config.d/40-stash-cache-plugin.cfg"
102-
else:
103-
CACHING_PLUGIN_CFG_PATH = "/etc/xrootd/config.d/40-osg-caching-plugin.cfg"
100+
try:
101+
if core.PackageVersion('stash-cache') >= '1.1.0':
102+
CACHING_PLUGIN_CFG_PATH = "/etc/xrootd/config.d/40-stash-cache-plugin.cfg"
103+
else:
104+
CACHING_PLUGIN_CFG_PATH = "/etc/xrootd/config.d/40-osg-caching-plugin.cfg"
105+
except OSError:
106+
pass # stash-cache isn't installed
104107

105108
NAMESPACE = "stashcache"
106109

0 commit comments

Comments
 (0)