Commit fe26350a075eeca19bdb00978d23282098d0df40
1 parent
fbf921e4
Exists in
master
and in
1 other branch
- fixed keyerror exception when user 0 logs out
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
BUGS.md
| ... | ... | @@ -27,6 +27,7 @@ |
| 27 | 27 | |
| 28 | 28 | # FIXED |
| 29 | 29 | |
| 30 | +- qd user 0 faz logout rebenta. | |
| 30 | 31 | - Quando grava JSON do teste deve usar 'path' tal como definido na configuração e não expandido. Isto porque em OSX /home é /Users e quando se muda de um sistema para outro não encontra os testes. Assim, usando ~ na configuração deveria funcionar sempre. |
| 31 | 32 | - configuração do teste não joga bem com o do aprendizations. Em particular os scripts não ficam com o mesmo path!!! |
| 32 | 33 | - configurar pf em freebsd, port forward 80 -> 8080. documentacao | ... | ... |
app.py
| ... | ... | @@ -108,7 +108,8 @@ class App(object): |
| 108 | 108 | |
| 109 | 109 | # ----------------------------------------------------------------------- |
| 110 | 110 | def logout(self, uid): |
| 111 | - del self.online[uid] | |
| 111 | + self.online.pop(uid, None) # remove from dict if exists | |
| 112 | + # del self.online[uid] | |
| 112 | 113 | logger.info('Student {}: logged out.'.format(uid)) |
| 113 | 114 | |
| 114 | 115 | # ----------------------------------------------------------------------- | ... | ... |