Skip to content

Commit

Permalink
Merge pull request #14022 from gartung/edm-Check-Class-Version-fix
Browse files Browse the repository at this point in the history
The return values of gSystem->Load(library) can be 0 or 1.
  • Loading branch information
cmsbuild committed Apr 13, 2016
2 parents 04c2d1f + 069d7ad commit cd8f381
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions FWCore/Utilities/scripts/edmAddClassVersion
Expand Up @@ -227,11 +227,11 @@ if __name__ == '__main__':
import ROOT
ROOT.PyConfig.DisableRootLogon = True
if options.library is None:
if 0 != ROOT.gSystem.Load("libFWCoreFWLite"):
if ROOT.gSystem.Load("libFWCoreFWLite") < 0:
raise RuntimeError("failed to load libFWCoreFWLite")
ROOT.fwlite.enable()
else:
if 0 != ROOT.gSystem.Load(options.library):
if ROOT.gSystem.Load(options.library) < 0:
raise RuntimeError("failed to load library '"+options.library+"'")

import subprocess,sys
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Utilities/scripts/edmCheckClassTransients
Expand Up @@ -68,7 +68,7 @@ ROOT.gROOT.ProcessLine(".autodict")
if options.library is None:
print "Transient member check requires a specific library"
else:
if 0 != ROOT.gSystem.Load(options.library):
if ROOT.gSystem.Load(options.library) < 0 :
raise RuntimeError("failed to load library '"+options.library+"'")

p = RMParser(options.rmfiles)
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Utilities/scripts/edmCheckClassVersion
Expand Up @@ -172,7 +172,7 @@ if options.library is None:
if options.checkdict :
print "Dictionary checks require a specific library"
else:
if 0 != ROOT.gSystem.Load(options.library):
if ROOT.gSystem.Load(options.library) < 0 :
raise RuntimeError("failed to load library '"+options.library+"'")

missingDict = 0
Expand Down

0 comments on commit cd8f381

Please sign in to comment.