Skip to content

Commit

Permalink
hltGetConfiguration: send errors to stderr instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Jul 14, 2015
1 parent 4fbd23e commit bf74269
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions HLTrigger/Configuration/python/Tools/confdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ def getRawConfigurationFromDB(self):

data, err = self.converter.query( *args )
if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
print "%s: error while retriving the HLT menu" % os.path.basename(sys.argv[0])
print
print err
print
sys.stderr.write("%s: error while retrieving the HLT menu\n\n" % os.path.basename(sys.argv[0]))
sys.stderr.write(err + "\n\n")
sys.exit(1)
self.data = data

Expand All @@ -98,10 +96,8 @@ def getPathList(self):

data, err = self.converter.query( *args )
if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
print "%s: error while retriving the list of paths from the HLT menu" % os.path.basename(sys.argv[0])
print
print err
print
sys.stderr.write("%s: error while retrieving the list of paths from the HLT menu\n\n" % os.path.basename(sys.argv[0]))
sys.stderr.write(err + "\n\n")
sys.exit(1)
filter = re.compile(r' *= *cms.(End)?Path.*')
paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
Expand Down

0 comments on commit bf74269

Please sign in to comment.