Skip to content

Commit

Permalink
Handle missing TEx metric gracefully.
Browse files Browse the repository at this point in the history
  • Loading branch information
wmwv committed Aug 5, 2017
1 parent c1ef6d8 commit 9e76126
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions python/lsst/validate/drp/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,14 @@ def plot_metrics(job, filterName, outputPrefix=''):
for x in (1, 2):
texName = 'TE{0:d}'.format(x)

measurement = job.get_measurement(texName)
if measurement.quantity is not None:
try:
plotTEx(measurement, filterName,
texSpecName='design',
outputPrefix=outputPrefix)
except RuntimeError as e:
print(e)
print('\tSkipped plot{}'.format(texName))
try:
measurement = job.get_measurement(texName)
plotTEx(measurement, filterName,
texSpecName='design',
outputPrefix=outputPrefix)
except RuntimeError as e:
print(e)
print('\tSkipped plot{}'.format(texName))


def print_metrics(job, filterName, metrics):
Expand Down

0 comments on commit 9e76126

Please sign in to comment.