Commit 466523ac authored by Chris Lamb's avatar Chris Lamb 👀
Browse files

Don't error-out with a traceback if we encounter struct.unpack-related errors...

Don't error-out with a traceback if we encounter struct.unpack-related errors when parsing .pyc files. (Closes: Debian:#1064973)

We should actually make the parsing *work*, but at least this won't cause
diffoscope to quit in the meantime.
parent ce04e0dd
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ class PycFile(File):
                    source="Python bytecode",
                )
            ]
        except (ValueError, IndexError) as exc:
        except (ValueError, IndexError, struct.error) as exc:
            self.add_comment("Could not decompile bytecode: {}".format(exc))
            return []