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 1515 /formation/user/v/vhamar/0/20: 1 files, 0 sub-directories
1616 16 matched files have been put in formation-user-v-vhamar.lfns
1717"""
18+
19+ import fnmatch
20+ from datetime import datetime , timedelta
21+
1822from DIRAC .Core .Base .Script import Script
1923
2024
@@ -54,11 +58,6 @@ def main():
5458 from DIRAC .ConfigurationSystem .Client .Helpers .Registry import getVOForGroup
5559 from DIRAC .Core .Security .ProxyInfo import getProxyInfo
5660 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
6261
6362 fc = FileCatalog ()
6463
@@ -108,8 +107,10 @@ def isOlderThan(cTimeStruct, days):
108107 res = fc .getDirectoryDump (baseDir , timeout = 360 )
109108 if not res ["OK" ]:
110109 gLogger .error ("Error retrieving directory contents" , f"{ baseDir } { res ['Message' ]} " )
110+ DIRAC .exit (1 )
111111 elif baseDir in res ["Value" ]["Failed" ]:
112112 gLogger .error ("Error retrieving directory contents" , f"{ baseDir } { res ['Value' ]['Failed' ][baseDir ]} " )
113+ DIRAC .exit (1 )
113114 else :
114115 dirContents = res ["Value" ]["Successful" ][baseDir ]
115116 subdirs = dirContents ["SubDirs" ]
You can’t perform that action at this time.
0 commit comments