File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/DIRAC/DataManagementSystem/scripts Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 15
15
/formation/user/v/vhamar/0/20: 1 files, 0 sub-directories
16
16
16 matched files have been put in formation-user-v-vhamar.lfns
17
17
"""
18
+
19
+ import fnmatch
20
+ from datetime import datetime , timedelta
21
+
18
22
from DIRAC .Core .Base .Script import Script
19
23
20
24
@@ -54,11 +58,6 @@ def main():
54
58
from DIRAC .ConfigurationSystem .Client .Helpers .Registry import getVOForGroup
55
59
from DIRAC .Core .Security .ProxyInfo import getProxyInfo
56
60
from DIRAC .Resources .Catalog .FileCatalog import FileCatalog
57
- from datetime import datetime , timedelta
58
- import sys
59
- import os
60
- import time
61
- import fnmatch
62
61
63
62
fc = FileCatalog ()
64
63
@@ -108,8 +107,10 @@ def isOlderThan(cTimeStruct, days):
108
107
res = fc .getDirectoryDump (baseDir , timeout = 360 )
109
108
if not res ["OK" ]:
110
109
gLogger .error ("Error retrieving directory contents" , f"{ baseDir } { res ['Message' ]} " )
110
+ DIRAC .exit (1 )
111
111
elif baseDir in res ["Value" ]["Failed" ]:
112
112
gLogger .error ("Error retrieving directory contents" , f"{ baseDir } { res ['Value' ]['Failed' ][baseDir ]} " )
113
+ DIRAC .exit (1 )
113
114
else :
114
115
dirContents = res ["Value" ]["Successful" ][baseDir ]
115
116
subdirs = dirContents ["SubDirs" ]
You can’t perform that action at this time.
0 commit comments