Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
UW-Glance
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eva Schiffer
UW-Glance
Commits
2d925fbd
Commit
2d925fbd
authored
8 years ago
by
Eva Schiffer
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request
#7
from adesmet-ssec/info-exit-code
if glance info can't read files, return non-zero
parents
fd3b2f9e
4758bcca
No related branches found
Branches containing commit
Tags
0.15.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyglance/glance/compare.py
+6
-0
6 additions, 0 deletions
pyglance/glance/compare.py
with
6 additions
and
0 deletions
pyglance/glance/compare.py
+
6
−
0
View file @
2d925fbd
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment