diff --git a/pyglance/glance/compare.py b/pyglance/glance/compare.py index 439735dec3ce0a4e04213543c27b1cb8683bac9f..91cfaac534322e8f38a3287f2616b9f5b2d79db0 100644 --- a/pyglance/glance/compare.py +++ b/pyglance/glance/compare.py @@ -1184,6 +1184,7 @@ glance inspectStats A.hdf """list information about a list of files List available variables for comparison. """ + problems = 0 for fn in args: try : lal = list(io.open(fn)()) @@ -1191,6 +1192,11 @@ glance inspectStats A.hdf print fn + ': ' + ('\n ' + ' '*len(fn)).join(lal) except KeyError : LOG.warn('Unable to open / process file selection: ' + fn) + problems += 1 + if problems > 255: + # exit code is 8-bits, limit ourselves. + problems = 255 + return problems def stats(*args): """create statistics summary of variables