Merge pull request #543 from jedgarpark/pyportal-twitter-stars

ValueAdd fix to twitter.py and stars.py
This commit is contained in:
Kattni 2019-02-27 13:41:58 -05:00 committed by GitHub
commit 88d9b336ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ while True:
print("New star!")
pyportal.play_file(cwd+"/coin.wav")
last_value = value
except RuntimeError as e:
except (ValueError, RuntimeError) as e:
print("Some error occured, retrying! -", e)
time.sleep(60) # wait a minute before getting again

View file

@ -41,7 +41,7 @@ while True:
print("New follower!")
pyportal.play_file(cwd+"/coin.wav") # uncomment make a noise!
last_value = value
except RuntimeError as e:
except (ValueError, RuntimeError) as e:
print("Some error occured, retrying! -", e)
time.sleep(60) # wait a minute before getting again