- merge unreleased changed from repository of Matthew Nicholson
git-svn-id: https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/trunk@17 01a3061f-1c3a-49da-a2a0-fa5697faa6a0
This commit is contained in:
1 parent
b9bd2092c0
commit
b886c83df4
4 files changed
+40
-10
No files matched your search
+2
-2
@@ -463,11 +463,11 @@ class AGI:
|
||||
|
||||
def set_autohangup(self, secs):
|
||||
"""agi.set_autohangup(secs) --> None
|
||||
Cause the channel to automatically hangup at <time> seconds in the
|
||||
Cause the channel to automatically hangup at <secs> seconds in the
|
||||
future. Of course it can be hungup before then as well. Setting to
|
||||
0 will cause the autohangup feature to be disabled on this channel.
|
||||
"""
|
||||
self.execute('SET AUTOHANGUP', time)
|
||||
self.execute('SET AUTOHANGUP', secs)
|
||||
|
||||
def hangup(self, channel=''):
|
||||
"""agi.hangup(channel='')
|
||||
|
||||
+4
-4
@@ -117,9 +117,9 @@ class ManagerMsg(object):
|
||||
"""Check for a header"""
|
||||
return self.headers.has_key(hname)
|
||||
|
||||
def get_header(self, hname):
|
||||
def get_header(self, hname, defval = None):
|
||||
"""Return the specfied header"""
|
||||
return self.headers[hname]
|
||||
return self.headers.get(hname, defval)
|
||||
|
||||
def __getitem__(self, hname):
|
||||
"""Return the specfied header"""
|
||||
@@ -148,9 +148,9 @@ class Event(object):
|
||||
"""Check for a header"""
|
||||
return self.headers.has_key(hname)
|
||||
|
||||
def get_header(self, hname):
|
||||
def get_header(self, hname, defval = None):
|
||||
"""Return the specfied header"""
|
||||
return self.headers[hname]
|
||||
return self.headers.get(hname, defval)
|
||||
|
||||
def __getitem__(self, hname):
|
||||
"""Return the specfied header"""
|
||||
|
||||
Reference in new issue
Block a user