pre-upload: rewrite tag logic to avoid filter()

We've banned the filter() builtin, so rewrite the logic to avoid it.
This makes the check slightly more strict in that we only allow tags
with the correct case, but that should be fine.

TEST=unittests pass

Change-Id: Ia10dff1ac2027b77e435c1d1155cefdf74031b94
Tested-by: Mike Frysinger <>
Commit-Ready: Mike Frysinger <>
Legacy-Commit-Queue: Commit Bot <>
Reviewed-by: Jack Neus <>
2 files changed