You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invert default value logic for BusABC._is_shutdown. (#1774)
The destructor of BusABC gives a warning when shutdown() was not
previously called on the object after construction. However, if the
construction fails (e.g. when the derived bus class constructor raises
an exception), there is no way to call shutdown() on the unfinished
object, and it is not necessary either.
Initialize the _is_shutdown flag to False initially and flip it to
True only when the parent class constructor runs, which usually
happens last in derived classes. That avoids the shutdown warning for
objects that failed to initialize at all.
0 commit comments