Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use das_client wrapper instead of the python das_client module #15621

Merged
merged 1 commit into from Aug 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions Alignment/OfflineValidation/python/TkAlAllInOneTool/dataset.py
@@ -1,7 +1,7 @@
# idea stolen from:
# http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/
# PhysicsTools/PatAlgos/python/tools/cmsswVersionTools.py
import das_client
import Utilities.General.cmssw_das_client as das_client
import json
import os
import bisect
Expand Down Expand Up @@ -337,8 +337,7 @@ def forcerunrangefunction(s):
return forcerunrangefunction

def __getData( self, dasQuery, dasLimit = 0 ):
dasData = das_client.get_data( 'https://cmsweb.cern.ch',
dasQuery, 0, dasLimit, False )
dasData = das_client.get_data(dasQuery, dasLimit)
if isinstance(dasData, str):
jsondict = json.loads( dasData )
else:
Expand All @@ -349,7 +348,10 @@ def __getData( self, dasQuery, dasLimit = 0 ):
except KeyError:
error = None
if error or self.__findInJson(jsondict,"status") != 'ok' or "data" not in jsondict:
jsonstr = str(jsondict)
try:
jsonstr = self.__findInJson(jsondict,"reason")
except KeyError:
jsonstr = str(jsondict)
if len(jsonstr) > 10000:
jsonfile = "das_query_output_%i.txt"
i = 0
Expand Down