jaredsampson / pymolprobity

A MolProbity-style visualization plugin for PyMOL
MIT License
11 stars 3 forks source link

main.get_or_create_object() always raises a KeyError when creating an object #2

Closed jaredsampson closed 7 years ago

jaredsampson commented 7 years ago

This happens as a result of using a try/except block and to call get_object(), which raises an error if the object doesn't exist yet. This is clearly contrary to the purpose of the function. We need to check to the objects dict keys and only call get_object() if the key exists.