From 1cafcb00ee0efb2ffa2d0fd26ea2e7d669c4f6b1 Mon Sep 17 00:00:00 2001 From: Andreas Poehlmann Date: Sat, 8 Apr 2023 15:21:43 +0200 Subject: [PATCH] pcapng.blocks: add __dir__ to class Block --- pcapng/blocks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcapng/blocks.py b/pcapng/blocks.py index 2c9abab..63c4bf2 100644 --- a/pcapng/blocks.py +++ b/pcapng/blocks.py @@ -105,6 +105,9 @@ def __getattr__(self, name): except KeyError as e: raise AttributeError(name) from e + def __dir__(self): + return [*super().__dir__(), *self._decoded] + def __setattr__(self, name, value): # __setattr__ is called for *any* attribute, real or not. try: