File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
src/DIRAC/DataManagementSystem/scripts Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -59,29 +59,36 @@ def main():
59
59
fcType = allCatalogs [0 ]
60
60
catalog = None
61
61
else :
62
- print ("Starting FileCatalog container client:" )
62
+ print (
63
+ "\n Starting FileCatalog container console. \n "
64
+ "Note that you will access several catalogs at the same time:"
65
+ )
63
66
print (f" { masterCatalog } - Master" )
64
67
for cat in allCatalogs :
65
68
if cat != masterCatalog :
66
69
cTypes = ["Write" ] if cat in writeCatalogs else []
67
70
cTypes .extend (["Read" ] if cat in readCatalogs else [])
68
71
print (f" { cat } - { '-' .join (cTypes )} " )
69
- print ("" )
72
+ print ("If you want to work with a single catalog, specify it with the -f option \n " )
70
73
71
74
if fcType :
75
+ # We have to use a specific File Catalog, create it now
72
76
from DIRAC .Resources .Catalog .FileCatalogFactory import FileCatalogFactory
73
77
74
78
result = FileCatalogFactory ().createCatalog (fcType )
75
79
if not result ["OK" ]:
76
80
print (result ["Message" ])
77
81
dexit (- 1 )
78
82
catalog = result ["Value" ]
79
- print (f"Starting { fcType } client " )
83
+ print (f"Starting { fcType } console " )
80
84
81
85
from DIRAC .DataManagementSystem .Client .FileCatalogClientCLI import FileCatalogClientCLI
82
86
83
- cli = FileCatalogClientCLI (catalog )
84
- cli .cmdloop ()
87
+ if catalog :
88
+ cli = FileCatalogClientCLI (catalog )
89
+ cli .cmdloop ()
90
+ else :
91
+ print (f"Failed to access the catalog { fcType if fcType else 'container' } " )
85
92
86
93
87
94
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments