diff --git a/mitmproxy/contrib/kaitaistruct/exif.py b/mitmproxy/contrib/kaitaistruct/exif.py index 2e8f1f9ff..d99cceef1 100644 --- a/mitmproxy/contrib/kaitaistruct/exif.py +++ b/mitmproxy/contrib/kaitaistruct/exif.py @@ -12,7 +12,9 @@ from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, if parse_version(ks_version) < parse_version('0.7'): raise Exception("Incompatible Kaitai Struct Python API: 0.7 or later is required, but you have %s" % (ks_version)) -from exif_le import ExifLe +from .exif_le import ExifLe +from .exif_be import ExifBe + class Exif(KaitaiStruct): def __init__(self, _io, _parent=None, _root=None): self._io = _io @@ -24,5 +26,3 @@ class Exif(KaitaiStruct): self.body = ExifLe(self._io) elif _on == 19789: self.body = ExifBe(self._io) - - diff --git a/mitmproxy/contrib/kaitaistruct/jpeg.py b/mitmproxy/contrib/kaitaistruct/jpeg.py index a49c83b93..33fc012fa 100644 --- a/mitmproxy/contrib/kaitaistruct/jpeg.py +++ b/mitmproxy/contrib/kaitaistruct/jpeg.py @@ -12,7 +12,8 @@ from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, if parse_version(ks_version) < parse_version('0.7'): raise Exception("Incompatible Kaitai Struct Python API: 0.7 or later is required, but you have %s" % (ks_version)) -from exif import Exif +from .exif import Exif + class Jpeg(KaitaiStruct): class ComponentId(Enum): @@ -207,6 +208,3 @@ class Jpeg(KaitaiStruct): self.thumbnail_x = self._io.read_u1() self.thumbnail_y = self._io.read_u1() self.thumbnail = self._io.read_bytes(((self.thumbnail_x * self.thumbnail_y) * 3)) - - -