Skip to content
Snippets Groups Projects
Commit 043960d5 authored by Walter Lampl's avatar Walter Lampl
Browse files

IOVDbSvcConfig: Minor change to simplify reading from sqlite

parent bff99624
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!41874IOVDbSvcConfig: Minor change to simplify reading from sqlite
...@@ -130,10 +130,15 @@ def addFolderList(configFlags,listOfFolderInfoTuple,extensible=False,db=None): ...@@ -130,10 +130,15 @@ def addFolderList(configFlags,listOfFolderInfoTuple,extensible=False,db=None):
dbname=db dbname=db
else: else:
dbname=configFlags.IOVDb.DatabaseInstance dbname=configFlags.IOVDb.DatabaseInstance
if detDb not in _dblist.keys(): if detDb in _dblist.keys():
raise ConfigurationError("Error, db shorthand %s not known" % detDb) fs = "<db>"+_dblist[detDb]+"/"+dbname+"</db> " + fs
elif os.access(detDb,os.R_OK):
#Assume slqite file
fs = "<db>sqlite://;schema="+detDb+";dbname="+dbname+"</db> " + fs
else:
raise ConfigurationError("Error, db shorthand %s not known, nor found as sqlite file" % detDb)
#Append database string to folder-name #Append database string to folder-name
fs = "<db>"+_dblist[detDb]+"/"+dbname+"</db> " + fs
if extensible: if extensible:
fs = fs + '<extensible/>' fs = fs + '<extensible/>'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment