Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -134,4 +134,5 @@ v0.3.1:
v0.3.2:
2026-07-08 -- Date parsing warning https://github.com/hapi-server/client-python/pull/104
v0.3.3b0:
2026-07-22 -- Makefile and related updates
2026-07-22 -- Makefile and related updates
2026-08-10 -- Don't warn if binary not available
12 changes: 6 additions & 6 deletions hapiclient/capabilities.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,15 +18,14 @@ def capabilities(SERVER):
def get_format(SERVER, format):
"""Return the transport format to use, accounting for server capabilities.

If the requested format is not supported by the server, falls back to 'csv'
with a warning.
If the requested format is not supported by the server, falls back to 'csv'.
"""

from hapiclient.util import error, warning
from hapiclient.util import error

cformats = ['csv', 'binary'] # client formats
if format not in cformats:
msg = 'This client does not handle transport format "%s". Available options: %s'
msg = 'This client does not handle streaming format "%s". Available options: %s'
error(msg % (format, ', '.join(cformats)))

if format != 'csv':
Expand All@@ -39,8 +38,9 @@ def get_format(SERVER, format):
return 'csv'

if format not in formats:
msg = 'Requested transport format "%s" not avaiable from %s. Will use "csv". Available options: %s'
warning(msg % (format, SERVER, ', '.join(formats)))
#from hapiclient.util import warning
#msg = 'Requested streaming format "%s" not available from %s. Will use "csv". Available options: %s'
#warning(msg % (format, SERVER, ', '.join(formats)))
format = 'csv'

if 'binary' not in formats:
Expand Down
2 changes: 1 addition & 1 deletion hapiclient/info.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@ def info(SERVER, DATASET, PARAMETERS, opts):

meta = meta_cache_read(SERVER, DATASET, opts)
if meta is not None:
return meta
return meta

cat = catalog(SERVER)
url = SERVER + '/info?' + query_name(cat, 'dataset') + '=' + DATASET
Expand Down
Loading