DIRACGrid/DIRAC — Issue #494: FC: findDirectoriesByMetadata
Author: sposs
Created: 2012-02-08 13:09:31+00:00
State: open

Seems that when no directory corresponds to the input metadata query, the error comes from MySQL directly, and is not caught properly.
>>> meta['ProdID'] = 685
>>> fc.findDirectoriesByMetadata(meta)
{'Message': "Excution failed.: ( 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 )", 'OK': False, 'rpcStub': (('DataManagement/FileCatalog', {'skipCACheck': False, 'keepAliveLapse': 150, 'delegatedGroup': 'ilc_prod', 'delegatedDN': '/DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=sposs/CN=641989/CN=Stephane Guillaume Poss', 'timeout': 120}), 'findDirectoriesByMetadata', ({'EvtType': 'gghad', 'ProdID': 685},))}