Fix osdf code after upgrading to py38