Skip to content

Commit fe25529

Browse files
committed
Support removal of arrays
Match patterns such as "string-array" that would previously only return "array", and subsequently fail in `remove_resource_value`
1 parent 73eef7f commit fe25529

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

android_clean_app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def add_element(self, message):
4040
if res_all:
4141
res = res_all[0]
4242
bits = res.split('.')[-2:]
43+
if bits[0] != 'array':
44+
type=bits[0]
45+
else:
46+
# array is a generic type, which may take form string-array, integer-array, etc.
47+
# The only way to get type is to parse from errorLine1 which is less reliable than message.
48+
type=re.findall(Issue.pattern_array, errorLine1)[0][0]
4349
self.elements.append((bits[0], bits[1]))
4450
else:
4551
print("The pattern '%s' seems to find nothing in the error message '%s'. We can't find the resource and can't remove it. The pattern might have changed, please check and report this in github issues." % (

0 commit comments

Comments
 (0)