Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
ia-tntvillage: Handle empty arrays when no language found
Browse files Browse the repository at this point in the history
  • Loading branch information
nemobis committed Sep 5, 2019
1 parent 4522d17 commit 8b06e0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ia-tntvillage.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, release):
def getlanguage(self, description):
# TODO: Add languages? Italian is 84 % and the next 3 bring it to 87 %.
languages = re.findall(r"\b(ita|eng|fra|jap)\b", description, flags=re.I)
if languages is not None:
if languages:
return languages[0]

def getyear(self, title, description):
Expand Down Expand Up @@ -285,7 +285,7 @@ def main(argv=None):
print("ERROR: unexpected error uploading")
print(e)
sleep(180)
sleep(10)
sleep(5)

if __name__ == '__main__':
main()

0 comments on commit 8b06e0e

Please sign in to comment.