From 20dac17995da58077a35dc1878d743984d778eda Mon Sep 17 00:00:00 2001 From: Miguel Barao Date: Fri, 5 Jan 2018 10:24:45 +0000 Subject: [PATCH] - removed commented code and updated BUGS.md --- BUGS.md | 3 ++- app.py | 10 ++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/BUGS.md b/BUGS.md index 52699cf..182ba85 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,7 +1,7 @@ # BUGS -- md_to_html() nao usa o segundo argumento q. pode retirar-se dos templates? +- ctrl-c should ask for confirmation before exiting. - eventos unfocus? - servidor nao esta a lidar com eventos scroll/resize. ignorar? @@ -39,6 +39,7 @@ # FIXED +- md_to_html() nao usa o segundo argumento q. pode retirar-se dos templates? - config/logger.yaml ainda é do cherrypy... - uniformizar question.py com a de aprendizations... - qual a diferenca entre md_to_html e md_to_html_review, parece desnecessario haver dois. diff --git a/app.py b/app.py index d9ec112..e726ed2 100644 --- a/app.py +++ b/app.py @@ -128,7 +128,6 @@ class App(object): # ----------------------------------------------------------------------- def logout(self, uid): self.online.pop(uid, None) # remove from dict if exists - # del self.online[uid] logger.info(f'Student {uid}: logged out.') # ----------------------------------------------------------------------- @@ -139,7 +138,8 @@ class App(object): self.online[uid]['test'] = self.testfactory.generate(student_id) return self.online[uid]['test'] else: - logger.error(f'Student {uid}: offline, can\'t generate test') + # this implies an error in the code. should never be here! + logger.critical(f'Student {uid}: offline, can\'t generate test') return None # ----------------------------------------------------------------------- @@ -292,12 +292,6 @@ class App(object): s.commit() logger.info(f'Student {uid}: password reset to ""') - # def set_user_agent(self, uid, user_agent=''): - # self.online[uid]['student']['user_agent'] = user_agent - - # def set_user_ip(self, uid, ipaddress=''): - # self.online[uid]['student']['ip_address'] = ipaddress - def insert_new_student(self, uid, name): try: with self.db_session() as s: -- libgit2 0.21.2