diff --git a/labscript_utils/unitconversions/__init__.py b/labscript_utils/unitconversions/__init__.py index da49116..a1b01d3 100644 --- a/labscript_utils/unitconversions/__init__.py +++ b/labscript_utils/unitconversions/__init__.py @@ -26,7 +26,6 @@ class _All(object): def __getitem__(self, ix): if self.__all__ is None: - self.__all__ = [] self._import_all() return self.__all__[ix] @@ -34,6 +33,8 @@ def _import_all(self): """imports all unit conversion classes in module within this subpackage into this module's globals. This is used only for backward compatibility with unit conversion classes that were not specified with a fully qualified name""" + if self.__all__ is None: + self.__all__ = [] for filename in os.listdir(os.path.split(__file__)[0]): if filename.endswith('.py') and filename != '__init__.py': module = filename[:-3] pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy