Skip to content

Commit

Permalink
use das_client wrapper instead of the python das_client module
Browse files Browse the repository at this point in the history
  • Loading branch information
vbotta committed Aug 26, 2016
1 parent 068e4ef commit 118d6f2
Showing 1 changed file with 3 additions and 4 deletions.
@@ -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,7 @@ 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)
jsonstr = jsondict['reason']
if len(jsonstr) > 10000:
jsonfile = "das_query_output_%i.txt"
i = 0
Expand Down

0 comments on commit 118d6f2

Please sign in to comment.