Skip to content

Commit e1d0cf6

Browse files
committed
Fix bytes vs. str bugs due to transition to Py3
1 parent b67b6b3 commit e1d0cf6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/ccplot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ def plot_profile(what, fname, product, fig, axes, hextent=HorizontalExtent(),
13281328
global ATRAIN_SPEED, PROFILE_BINHEIGHT
13291329

13301330
info = DATASETS.get(what, {
1331-
"datasets": [what],
1331+
"datasets": [what.encode('utf-8')],
13321332
})
13331333
filetype = autodetect(product)
13341334
product_name = None

ccplot/hdf.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ class HDF(DictMixin):
444444
)
445445

446446
if data_type == DFNT_CHAR:
447-
return bytes(bytearray(data)).rstrip('\0')
447+
return bytes(bytearray(data)).rstrip(b'\0')
448448
else:
449449
return data.view(dtype=dtype)
450450

0 commit comments

Comments
 (0)