reordered calc.py's aliases, changed remind.py to wait on stop condition, added timeout to url.py

This commit is contained in:
iou1name 2018-06-11 12:49:36 -04:00
parent 8e28d83af4
commit 7a7da7bae7
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ from tools.calculation import eval_equation
BASE_TUMBOLIA_URI = 'https://tumbolia-two.appspot.com/' BASE_TUMBOLIA_URI = 'https://tumbolia-two.appspot.com/'
@commands('c', 'calc') @commands('calc', 'c')
@example('.c 5 + 3', '8') @example('.c 5 + 3', '8')
def c(bot, trigger): def c(bot, trigger):
"""Evaluate some calculation.""" """Evaluate some calculation."""

View File

@ -44,7 +44,7 @@ class MonitorThread(threading.Thread):
delete_reminder(self._bot, oldtime) delete_reminder(self._bot, oldtime)
if not self._bot.memory["remind"] or not self._bot.stillConnected(): if not self._bot.memory["remind"] or not self._bot.stillConnected():
self.stop.set() self.stop.set()
time.sleep(2.5) self.stop.wait(2.5)
del self._bot.memory["remind_monitor"] del self._bot.memory["remind_monitor"]

View File

@ -35,7 +35,7 @@ def title_auto(bot, trigger):
if broken: if broken:
continue continue
try: try:
res = requests.get(url, headers=HEADERS, verify=True) res = requests.get(url, headers=HEADERS, verify=True, timeout=10)
except requests.exceptions.ConnectionError: except requests.exceptions.ConnectionError:
continue continue
try: try: