/offlineimap/head: changeset 306

Removed debug prints
This commit is contained in:
jgoerzen 2003-01-05 12:55:37 +01:00
parent 0b7d75de60
commit 86df6db630
2 changed files with 0 additions and 26 deletions

View File

@ -95,8 +95,6 @@ class BlinkenBase:
s.tflock.acquire() s.tflock.acquire()
print "b98"
try: try:
if not accountname in s.threadframes: if not accountname in s.threadframes:
s.threadframes[accountname] = {} s.threadframes[accountname] = {}
@ -104,20 +102,14 @@ class BlinkenBase:
if threadid in s.threadframes[accountname]: if threadid in s.threadframes[accountname]:
return s.threadframes[accountname][threadid] return s.threadframes[accountname][threadid]
print 'b107'
if not accountname in s.availablethreadframes: if not accountname in s.availablethreadframes:
s.availablethreadframes[accountname] = [] s.availablethreadframes[accountname] = []
print 'b112'
if len(s.availablethreadframes[accountname]): if len(s.availablethreadframes[accountname]):
tf = s.availablethreadframes[accountname].pop(0) tf = s.availablethreadframes[accountname].pop(0)
tf.setthread(currentThread()) tf.setthread(currentThread())
else: else:
print 'b118'
tf = s.getaccountframe().getnewthreadframe() tf = s.getaccountframe().getnewthreadframe()
print 'b120'
s.threadframes[accountname][threadid] = tf s.threadframes[accountname][threadid] = tf
return tf return tf

View File

@ -215,12 +215,8 @@ class Blinkenlights(BlinkenBase, UIBase):
s.c = CursesUtil() s.c = CursesUtil()
s.text = [] s.text = []
BlinkenBase.init_banner(s) BlinkenBase.init_banner(s)
print 217
s.setupwindows(dolock = 0) s.setupwindows(dolock = 0)
print '219a'
s.inputhandler = InputHandler(s.c) s.inputhandler = InputHandler(s.c)
print 219
print 221
s._msg(version.banner) s._msg(version.banner)
s._msg(str(dir(s.c.stdscr))) s._msg(str(dir(s.c.stdscr)))
@ -245,7 +241,6 @@ class Blinkenlights(BlinkenBase, UIBase):
return password return password
def setupwindows(s, dolock = 1): def setupwindows(s, dolock = 1):
print 244
if dolock: if dolock:
s.iolock.acquire() s.iolock.acquire()
try: try:
@ -257,25 +252,18 @@ class Blinkenlights(BlinkenBase, UIBase):
s.logwindow.scrollok(1) s.logwindow.scrollok(1)
s.setupwindow_drawlog() s.setupwindow_drawlog()
print 258
accounts = s.af.keys() accounts = s.af.keys()
accounts.sort() accounts.sort()
accounts.reverse() accounts.reverse()
print 264
pos = s.c.height - 1 pos = s.c.height - 1
for account in accounts: for account in accounts:
accountwindow = curses.newwin(1, s.c.width, pos, 0) accountwindow = curses.newwin(1, s.c.width, pos, 0)
s.af[account].setwindow(accountwindow) s.af[account].setwindow(accountwindow)
pos -= 1 pos -= 1
print 272
curses.doupdate() curses.doupdate()
print 276
finally: finally:
if dolock: if dolock:
s.iolock.release() s.iolock.release()
@ -299,9 +287,7 @@ class Blinkenlights(BlinkenBase, UIBase):
def getaccountframe(s): def getaccountframe(s):
accountname = s.getthreadaccount() accountname = s.getthreadaccount()
print 'c302: ', accountname
s.aflock.acquire() s.aflock.acquire()
print 'c304'
try: try:
if accountname in s.af: if accountname in s.af:
return s.af[accountname] return s.af[accountname]
@ -309,10 +295,8 @@ class Blinkenlights(BlinkenBase, UIBase):
# New one. # New one.
s.af[accountname] = CursesAccountFrame(s.c) s.af[accountname] = CursesAccountFrame(s.c)
#s.iolock.acquire() #s.iolock.acquire()
print 297
s.c.reset() s.c.reset()
s.setupwindows(dolock = 0) s.setupwindows(dolock = 0)
print 300
#s.iolock.release() #s.iolock.release()
finally: finally:
s.aflock.release() s.aflock.release()
@ -325,7 +309,6 @@ class Blinkenlights(BlinkenBase, UIBase):
s._msg(thisline) s._msg(thisline)
return return
s.iolock.acquire() s.iolock.acquire()
print 326
try: try:
if not s.c.isactive(): if not s.c.isactive():
# For dumping out exceptions and stuff. # For dumping out exceptions and stuff.
@ -335,7 +318,6 @@ class Blinkenlights(BlinkenBase, UIBase):
s.gettf().setcolor(color) s.gettf().setcolor(color)
s._addline_unlocked(msg, s.gettf().getcolor()) s._addline_unlocked(msg, s.gettf().getcolor())
s.logwindow.refresh() s.logwindow.refresh()
print 336
finally: finally:
s.iolock.release() s.iolock.release()