mylife: catch IOError too

master
mutantmonkey 2011-09-21 20:54:47 -04:00
parent f34695717d
commit 06133ef0c3
1 changed files with 10 additions and 10 deletions

View File

@ -16,7 +16,7 @@ def fml(phenny, input):
""".fml"""
try:
req = web.get("http://www.fmylife.com/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("I tried to use .fml, but it was broken. FML")
return
@ -29,7 +29,7 @@ def mlia(phenny, input):
""".mlia - My life is average."""
try:
req = web.get("http://mylifeisaverage.com/")
except HTTPError:
except HTTPError, IOError:
phenny.say("I tried to use .mlia, but it wasn't loading. MLIA")
return
@ -43,7 +43,7 @@ def mliarab(phenny, input):
""".mliarab - My life is Arabic."""
try:
req = web.get("http://mylifeisarabic.com/random/")
except HTTPError:
except HTTPError, IOError:
phenny.say("The site you requested, mylifeisarabic.com, has been banned \
in the UAE. You will be reported to appropriate authorities")
return
@ -59,7 +59,7 @@ def mlib(phenny, input):
""".mlib - My life is bro."""
try:
req = web.get("http://mylifeisbro.com/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("MLIB is out getting a case of Natty. It's chill.")
return
@ -72,7 +72,7 @@ def mlic(phenny, input):
""".mlic - My life is creepy."""
try:
req = web.get("http://mylifeiscreepy.com/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("Error: Have you checked behind you?")
return
@ -86,7 +86,7 @@ def mlid(phenny, input):
""".mlib - My life is Desi."""
try:
req = web.get("http://www.mylifeisdesi.com/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("MLID is busy at the hookah lounge, be back soon.")
return
@ -99,7 +99,7 @@ def mlig(phenny, input):
""".mlig - My life is ginger."""
try:
req = web.get("http://www.mylifeisginger.org/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("Busy eating your soul. Be back soon.")
return
@ -112,7 +112,7 @@ def mlih(phenny, input):
""".mlih - My life is ho."""
try:
req = web.get("http://mylifeisho.com/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("MLIH is giving some dome to some lax bros.")
return
@ -125,7 +125,7 @@ def mlihp(phenny, input):
""".mlihp - My life is Harry Potter."""
try:
req = web.get("http://www.mylifeishp.com/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("This service is not available to Muggles.")
return
@ -138,7 +138,7 @@ def mlit(phenny, input):
""".mlit - My life is Twilight."""
try:
req = web.get("http://mylifeistwilight.com/random")
except HTTPError:
except HTTPError, IOError:
phenny.say("Error: Your life is too Twilight. Go outside.")
return