minor rewrite for Python 3 support. Some other fixes in corresponding files.

This commit is contained in:
Timur Tuchkovenko committed 2014-10-08 11:43:32 +06:00
1 parent 6bd0cc9bd6
commit 5efe3f4593
11 files changed
+122 -83

No files matched your search

+8 -8
View File
@@ -14,20 +14,20 @@ try:
# get a status report
response = manager.status()
print response
print(response)
response = manager.command('core show channels concise')
print response.data
print(response.data)
manager.logoff()
except asterisk.manager.ManagerSocketException, (errno, reason):
print "Error connecting to the manager: %s" % reason
except asterisk.manager.ManagerSocketException as e:
print "Error connecting to the manager: %s" % e.strerror
sys.exit(1)
except asterisk.manager.ManagerAuthException, reason:
print "Error logging in to the manager: %s" % reason
except asterisk.manager.ManagerAuthException as e:
print "Error logging in to the manager: %s" % e.strerror
sys.exit(1)
except asterisk.manager.ManagerException, reason:
print "Error: %s" % reason
except asterisk.manager.ManagerException as e:
print "Error: %s" % e.strerror
sys.exit(1)
finally: