Skip to content

Commit

Permalink
Fixed GSF on python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
afedynitch committed May 11, 2020
1 parent 9e5d688 commit ce81037
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions crflux/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,12 @@ def __init__(self, spl_fname=None):
if fdate(fn) >= fdate(spl_fname):
spl_fname = fn
spl_fname = os.path.join(base_path, spl_fname)

self.p_frac_spl, self.p_flux_spl, self.n_flux_spl = pickle.load(
bz2.BZ2File(spl_fname), encoding='latin1')
try:
self.p_frac_spl, self.p_flux_spl, self.n_flux_spl = pickle.load(
bz2.BZ2File(spl_fname), encoding='latin1')
except TypeError:
self.p_frac_spl, self.p_flux_spl, self.n_flux_spl = pickle.load(
bz2.BZ2File(spl_fname))

self.nucleus_ids = []

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from setuptools import setup

__version__ = "1.0.5"
__version__ = "1.0.6"

def setup_package():
from os.path import abspath, dirname, join
Expand Down

0 comments on commit ce81037

Please # to comment.