Mercurial > kallithea
comparison rhodecode/lib/timerproxy.py @ 1307:c1516b35f91d beta
pep8ify
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 03 May 2011 16:54:43 +0200 |
parents | 1fb97030b9b7 |
children | 1f47adeb67c2 |
comparison
equal
deleted
inserted
replaced
1306:6e1d24503383 | 1307:c1516b35f91d |
---|---|
3 import logging | 3 import logging |
4 log = logging.getLogger('timerproxy') | 4 log = logging.getLogger('timerproxy') |
5 | 5 |
6 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = xrange(30, 38) | 6 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = xrange(30, 38) |
7 | 7 |
8 | |
8 def color_sql(sql): | 9 def color_sql(sql): |
9 COLOR_SEQ = "\033[1;%dm" | 10 COLOR_SEQ = "\033[1;%dm" |
10 COLOR_SQL = YELLOW | 11 COLOR_SQL = YELLOW |
11 normal = '\x1b[0m' | 12 normal = '\x1b[0m' |
12 return COLOR_SEQ % COLOR_SQL + sql + normal | 13 return COLOR_SEQ % COLOR_SQL + sql + normal |
14 | |
13 | 15 |
14 class TimerProxy(ConnectionProxy): | 16 class TimerProxy(ConnectionProxy): |
15 | 17 |
16 def __init__(self): | 18 def __init__(self): |
17 super(TimerProxy, self).__init__() | 19 super(TimerProxy, self).__init__() |