Skip to content

Commit

Permalink
Bugfix to the destructor of two TkDQM scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami committed Oct 3, 2022
1 parent 6f121f8 commit 4afd632
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions DQM/SiStripMonitorClient/scripts/PhaseITreeProducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ def DumpData(self):
print(len(self.availableNames))

def __del__(self):
if self.inputFile.IsOpen():
self.inputFile.Close()
if self.inputFile:
if self.inputFile.IsOpen():
self.inputFile.Close()

#--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
for i in range(1, len(sys.argv), 1):
Expand Down
5 changes: 3 additions & 2 deletions DQM/SiStripMonitorClient/scripts/TH2PolyOfflineMaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,9 @@ def PrintTrackerMaps(self):
c1.Print(self.outputDirName + mv + ".png")

def __del__(self):
if self.inputFile.IsOpen():
self.inputFile.Close()
if self.inputFile :
if self.inputFile.IsOpen():
self.inputFile.Close()

#--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
for i in range(1, len(sys.argv), 1):
Expand Down

0 comments on commit 4afd632

Please sign in to comment.