Skip to content

Commit

Permalink
replace boost injector with py3-compatible version
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthchirp committed Aug 29, 2019
1 parent 8c169ff commit add8c0d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions imageset.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def master_path():
return ""


class ImageSetAux(boost.python.injector, ImageSet):
@boost.python.inject_into(ImageSet)
class _(object):
"""
A class to inject additional methods into the imageset class
"""
Expand Down Expand Up @@ -184,7 +185,8 @@ def get_gain(self, index):
return super(ImageSetLazy, self).get_gain(index)


class ImageSweepAux(boost.python.injector, ImageSweep):
@boost.python.inject_into(ImageSweep)
class _(object):
def __getitem__(self, item):
"""Get an item from the sweep stream.
Expand Down Expand Up @@ -551,7 +553,3 @@ def imageset_from_anyset(imageset):
return ImageSet(imageset.data(), imageset.indices())
else:
raise ValueError("Unrecognized imageset type: %s" % str(type(imageset)))


boost.python.inject_into(ImageSet)(ImageSetAux)
boost.python.inject_into(ImageSweep)(ImageSweepAux)

0 comments on commit add8c0d

Please sign in to comment.