Skip to content

Commit

Permalink
Update vcat.py (#196)
Browse files Browse the repository at this point in the history
* Update vcat.py
  • Loading branch information
andamian authored Sep 13, 2021
1 parent 9a1476b commit e11c30a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vos/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ edit_on_github = False
github_project = opencadc/vostools
install_requires = html2text>=2016.5.29 cadcutils>=1.2.1 future aenum
# version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440)
version = 3.3.3
version = 3.3.4


[entry_points]
Expand Down
5 changes: 3 additions & 2 deletions vos/vos/commands/vcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ def _cat(uri, cert_filename=None, head=None):
fh = None
try:
view = head and 'header' or 'data'
fh = Client(vospace_certfile=cert_filename).open(uri, view=view)
if fh.is_remote_file(uri):
c = Client(vospace_certfile=cert_filename)
fh = c.open(uri, view=view)
if c.is_remote_file(uri):
sys.stdout.write(fh.read(return_response=True).text)
sys.stdout.write('\n\n')
else:
Expand Down

0 comments on commit e11c30a

Please sign in to comment.