cwbe coordinatez:
101
63540
2076399
856608
2224565

ABSOLUT
KYBERIA
permissions
you: r,
system: public
net: yes

neurons

stats|by_visit|by_K
source
tiamat
K|my_K|given_K
last
commanders
polls

total descendants::
total children::1
show[ 2 | 3] flat


ahojte,

mam takuto triedu:


class mpd_connector(object):

def __init__(self, host, port):
self.host = host
self.port = port
self.c = mpd_connection(host, port)

def __getattr__(self, attr):
try:
print 'here'
r = getattr(self.c, attr)
except EOFException:
print 'caught'
self.c = mpd_connection(host, port)
r = getattr(self, attr)
return r


mala by v podstate fungovat ako wrapper, ale ked v tom objecte mpd_connection cez getattr zavolana trieda vyvola exception, chcel by som ju chytit, objekt vytvorit nanovo a znova zavolat tu istu metodu.

problem je, ze aj ked sa ta exception vyvola, ten except: ju nechyti, v call trace nevidim tuto moju metodu, iba metody toho mpd_connection a potom uz iba to odkial to volam. Pritom ten wrapper naozaj funguje, to 'here' sa vypise pri kazdom volani. Netusite co s tym?


  submission:: Re: usla mi vynimka :: NEW (1 children )   NEW DESCENDANT   (mr gramma)


There are currently 9990 K available in
2nd Guild's K-treasury.




get 1 🦆 for 5 🐘
get 1 🐘 for 1 🦆