We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40fb8f0 commit 9acb20cCopy full SHA for 9acb20c
1 file changed
get_files_on_disk.py
@@ -5,6 +5,12 @@
5
import os,sys,getpass,warnings,glob,shlex,subprocess,argparse # pylint: disable=multiple-imports
6
from collections import defaultdict
7
8
+# prevent this script from ever being used in a batch job
9
+# to avoid DDOS of Rucio
10
+if "_CONDOR_SCRATCH_DIR" in os.environ:
11
+ print("Error: this script cannot be used in batch jobs")
12
+ sys.exit(1)
13
+
14
def getOS():
15
"""Gets OS version from shell (other methods return host OS when in container)"""
16
cmd = r"sed -nr 's/[^0-9]*([0-9]+).*/\1/p' /etc/redhat-release"
0 commit comments