From 2469ee04fe03606987851f761d8359e85a892040 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Thu, 3 Oct 2024 11:05:56 -0500 Subject: [PATCH] separate out classad import errors --- iceprod/server/data/condor_transfer_plugins/gsiftp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iceprod/server/data/condor_transfer_plugins/gsiftp.py b/iceprod/server/data/condor_transfer_plugins/gsiftp.py index 96a1d608..f2fa3951 100644 --- a/iceprod/server/data/condor_transfer_plugins/gsiftp.py +++ b/iceprod/server/data/condor_transfer_plugins/gsiftp.py @@ -6,7 +6,6 @@ by copying them from the path indicated to a job's working directory. """ -import classad import glob import os import sys @@ -19,6 +18,12 @@ EXIT_SUCCESS = 0 EXIT_FAILURE = 1 EXIT_AUTHENTICATION_REFRESH = 2 +EXIT_IMPORT_ERROR = 3 + +try: + import classad +except ImportError: + sys.exit(EXIT_IMPORT_ERROR) def print_help(stream=sys.stderr):