From af0076f4749a37df10da889513056fc9eb37b9bf Mon Sep 17 00:00:00 2001 From: Spencer Thiel <spencer.thiel@ssec.wisc.edu> Date: Wed, 24 May 2017 12:45:43 -0500 Subject: [PATCH] Python 3 compatibility in crio --- edosl0util/crio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edosl0util/crio.py b/edosl0util/crio.py index e308b87..c125c40 100644 --- a/edosl0util/crio.py +++ b/edosl0util/crio.py @@ -2,6 +2,7 @@ """PDS construction record input and output""" import ctypes as c +import numbers from edosl0util.headers import BaseStruct, DaySegmentedTimecode @@ -50,8 +51,7 @@ def read(cr_file): def read_struct(f, struct): rv = struct_to_dict(struct.from_buffer_copy(f.read(c.sizeof(struct)))) rv = {k: v for k, v in rv.items() if not k.startswith('spare_')} # no spare fields - return {k: int(v) if isinstance(v, long) else v for k, v in rv.items()} # no longs - + return {k: int(v) if isinstance(v, numbers.Integral) else v for k, v in rv.items()} # no longs return main() -- GitLab