Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:1
-
Epic Link:
-
Team:Data Release Production
Description
The lsstDebug documentation claims:
It is always safe to interrogate lsstDebug; for example lsstDebug.Info("Robert.Hugh.Lupton").isBadPerson will return False.
In fact, this is only true if a Robert.Hugh.Lupton module has been imported. Otherwise, we get:
In [1]: import lsstDebug
|
|
In [2]: lsstDebug.Info("Robert.Hugh.Lupton")
|
---------------------------------------------------------------------------
|
KeyError Traceback (most recent call last)
|
<ipython-input-2-7b61e1f45b97> in <module>()
|
----> 1 lsstDebug.Info("Robert.Hugh.Lupton")
|
|
/ssd/lsstsw/stack_20170409/Linux64/base/13.0-5-g77abda3+2/python/lsstDebug.pyc in __init__(self, modname)
|
51 def __init__(self, modname):
|
52 import sys
|
---> 53 self.__dict__["_dict"] = sys.modules[modname].__dict__
|
54 self._modname = modname
|
55
|
|
KeyError: 'Robert.Hugh.Lupton'
|
Thanks to Michael Wood-Vasey on CLO for spotting this.
Robert Lupton — I think you understand the design of this system better than anybody (since you produced it). What's the intended behaviour here? Is this a code or a documentation bug?