Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
model.py: Fix bug in gen_flatten_data()
The "python-3 hack" in this function does not work as intended. "unicode = unicode" line in try branch results in a "UnboundLocalError" on both python 2 and 3. This exception is a subclass of NameError, so the except branch is always taken. Consequence: If the data is a very large string (like GlueX translation table), doing "list(gen_flatten_data(data))" results in: RuntimeError: maximum recursion depth exceeded in cmp Recent GlueX translation table updates have been carried out with ccdb 1.06.00, which does not have this bug.
- Loading branch information