mirror of
https://github.com/offa/android-foss.git
synced 2026-04-22 21:26:19 +05:30
Use python exception type (#615)
This commit is contained in:
parent
15b3780cb2
commit
be159dc77d
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ class Category:
|
||||||
def add_app(self, app_str: str):
|
def add_app(self, app_str: str):
|
||||||
matches = re.findall("(?<=\\[\\*\\*).*(?=\\*\\*\\])", app_str)
|
matches = re.findall("(?<=\\[\\*\\*).*(?=\\*\\*\\])", app_str)
|
||||||
if len(matches) != 1:
|
if len(matches) != 1:
|
||||||
raise "These should be only one match"
|
raise RuntimeError("These should be only one match")
|
||||||
app_name = matches[0]
|
app_name = matches[0]
|
||||||
# make it lower case and append it
|
# make it lower case and append it
|
||||||
self.apps.append(app_name.lower())
|
self.apps.append(app_name.lower())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue