phabricator: stringify the argument to `getattr()`
This fixes a "TypeError: getattr(): attribute name must be string" crash and
subsequent test spew. This likely broke in 18c8c18993f0 and was missed in CI
because `pytest-vcr` is missing.
--- a/hgext/phabricator.py Mon Nov 13 09:19:11 2023 -0800
+++ b/hgext/phabricator.py Fri Dec 01 23:58:12 2023 -0500
@@ -1926,7 +1926,9 @@
raise error.Abort(_(b'unknown symbol: %s') % tree[1])
elif op in {b'and_', b'add', b'sub'}:
assert len(tree) == 3
- return getattr(operator, op)(walk(tree[1]), walk(tree[2]))
+ return getattr(operator, pycompat.sysstr(op))(
+ walk(tree[1]), walk(tree[2])
+ )
elif op == b'group':
return walk(tree[1])
elif op == b'ancestors':