[Shtoom] Small fixes
Adrien Di Mascio
Adrien.DiMascio at logilab.fr
Wed Mar 23 15:02:07 CET 2005
Hi there,
I've been playing with Shtoom these last days, and I had to make some
minor fixes (typos and al.) to make it work with our app.
I've attached a diff file to this mail that enumerates my changes. I'm
pretty sure that I didn't always fix things in the right way,
but I guess it will at least point out some errors in the code.
Thanks for developing Shtoom !
Cheers,
Adrien.
--
Adrien Di Mascio
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
-------------- next part --------------
Index: test/test_callcontrol.py
===================================================================
--- test/test_callcontrol.py (revision 1272)
+++ test/test_callcontrol.py (working copy)
@@ -90,7 +90,7 @@
if TDEBUG: print "callFailed", self.cookie
def cb_callConnected(self, cookie):
- if TDEBUG: print "callConnected", self.cookie
+ if TDEBUG: print "callConnected", cookie
self.actions.append(('connected',cookie))
def callDisconnected(self, cookie, reason):
Index: app/phone.py
===================================================================
--- app/phone.py (revision 1272)
+++ app/phone.py (working copy)
@@ -88,7 +88,7 @@
# Otherwise we chain callbacks
ringingCommand = self.getPref('ringing_command')
# Commented out until I test it
- if 0 and ringingCommand:
+ if ringingCommand:
from twisted.internet import reactor
args = ringingCommand.split(' ')
cmdname = args[0]
Index: app/base.py
===================================================================
--- app/base.py (revision 1272)
+++ app/base.py (working copy)
@@ -35,7 +35,7 @@
def getPref(self, pref):
if self._options.hasValue(pref):
return self._options.getValue(pref, None)
-
+
def updateOptions(self, dict, forceSave=False):
m = self._options.updateOptions(dict)
if m or forceSave:
Index: app/doug.py
===================================================================
--- app/doug.py (revision 1272)
+++ app/doug.py (working copy)
@@ -42,17 +42,18 @@
pass
elif not self.getPref('logfile'):
print "logging to stdout"
- log.startLogging(sys.stdout)
+ # FIXME: Do we really want to force stdout to be catched by log ?
+ log.startLogging(sys.stdout, setStdout=False)
else:
file = open(self.getPref('logfile'), 'aU')
#print "logging to file", file
- log.startLogging(file)
+ # FIXME: Do we really want to force stdout to be catched by log ?
+ log.startLogging(file, setStdout=False)
BaseApplication.boot(self)
def start(self):
"Start the application."
from twisted.internet import reactor
- import sys
vargs = self.getPref('dougargs')
if vargs:
kwargs = [x.split('=') for x in vargs.split(',') ]
@@ -76,7 +77,7 @@
v.va_start()
except:
ee,ev,et = sys.exc_info()
- log.err("voiceapp error", ee, ev, traceback.extract_tb(et))
+ log.err("voiceapp error %s, %s, %s" % (ee, ev, traceback.extract_tb(et)))
v = None
if v:
log.msg("new voiceapp %r"%(v), system='doug')
Index: sip.py
===================================================================
--- sip.py (revision 1272)
+++ sip.py (working copy)
@@ -407,7 +407,7 @@
''' Accept currently pending call.
'''
log.msg("rejecting because %r"%(response,), system='sip')
- if hasattr(response, sipCode):
+ if hasattr(response, 'sipCode'):
code = response.sipCode
else:
code = 603
Index: doug/voiceapp.py
===================================================================
--- doug/voiceapp.py (revision 1272)
+++ doug/voiceapp.py (working copy)
@@ -76,7 +76,11 @@
def va_callrejected(self, leg=None):
if leg is None:
leg = self._inbound
- self.__legs.remove(leg)
+ # self.__legs.remove(leg)
+ try:
+ del self.__legs[leg]
+ except KeyError:
+ print "Key %r not in self.__legs, can't remove it" % leg
self._triggerEvent(CallRejectedEvent(leg))
def va_abort(self):
Index: ui/gnomeui/prefs.py
===================================================================
--- ui/gnomeui/prefs.py (revision 1272)
+++ ui/gnomeui/prefs.py (working copy)
@@ -56,7 +56,7 @@
self.tooltips = gtk.Tooltips()
- notebook = gtk.Notebook(spacing=8)
+ notebook = gtk.Notebook() # spacing=8
notebook.set_border_width(4)
self.dialog.vbox.set_border_width(4)
self.dialog.vbox.pack_start(notebook)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/shtoom/attachments/20050323/79538a49/attachment.pgp>
More information about the Shtoom
mailing list