mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
0aa55642b8
Summary: `len()` on a hybrid manifest wrapping a treemanifest would raise an attribute error. But if there is no treemanifest or there is *only* a treemanifest, then a TypeError is raised. Using `len()` on an object that doesn't support length should always raise `TypeError`, consistently. Instead of looking up the `__len__` attribute, use the built-in `len()` function, which will raise `TypeError` if the wrapped manifest in a hybrid doesn't have a `__len__` method. This ensures that we get a consistent exception. Reviewed By: farnz Differential Revision: D7485510 fbshipit-source-id: 4132d6b383171cde8dd99dd60098716d4aedc527 |
||
---|---|---|
.. | ||
__init__.py | ||
cachemanager.py | ||
concurrency.py | ||
constants.py | ||
debug.py | ||
implementation.py | ||
metrics.py |