merged bug19841 into default

This commit is contained in:
Tony Garnock-Jones 2008-12-02 16:43:50 +00:00
commit 4870d125b4
2 changed files with 42 additions and 37 deletions

View File

@ -1,39 +1,37 @@
/*
Copyright (c) 2008 John Leuner
Permission is hereby granted, free of charge, to any person
obtaining a copy of this file (the "Software"), to deal in the
Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Class information entered from amqp_xml0-8.pdf and domain types from amqp-xml-doc0-9.pdf
b3cb053f15e7b98808c0ccc67f23cb3e amqp_xml0-8.pdf
http://www.twiststandards.org/index.php?option=com_docman&task=cat_view&gid=28&&Itemid=90
8444db91e2949dbecfb2585e9eef6d64 amqp-xml-doc0-9.pdf
https://jira.amqp.org/confluence/download/attachments/720900/amqp-xml-doc0-9.pdf?version=1
*/
{
"name": "AMQP",
"major-version": 8,
"minor-version": 0,
"port": 5672,
"copyright": [
"Copyright (c) 2008 John Leuner\n",
"\n",
"Permission is hereby granted, free of charge, to any person\n",
"obtaining a copy of this file (the \"Software\"), to deal in the\n",
"Software without restriction, including without limitation the \n",
"rights to use, copy, modify, merge, publish, distribute, \n",
"sublicense, and/or sell copies of the Software, and to permit \n",
"persons to whom the Software is furnished to do so, subject to \n",
"the following conditions:\n",
"\n",
"The above copyright notice and this permission notice shall be\n",
"included in all copies or substantial portions of the Software.\n",
"\n",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n",
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n",
"OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n",
"NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n",
"HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n",
"WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n",
"FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n",
"OTHER DEALINGS IN THE SOFTWARE.\n",
"\n",
"Class information entered from amqp_xml0-8.pdf and domain types from amqp-xml-doc0-9.pdf\n",
"\n",
"b3cb053f15e7b98808c0ccc67f23cb3e amqp_xml0-8.pdf\n",
"http://www.twiststandards.org/index.php?option=com_docman&task=cat_view&gid=28&&Itemid=90\n",
"8444db91e2949dbecfb2585e9eef6d64 amqp-xml-doc0-9.pdf\n",
"https://jira.amqp.org/confluence/download/attachments/720900/amqp-xml-doc0-9.pdf?version=1\n"],
"domains": [
["access-ticket", "short"],

View File

@ -28,14 +28,21 @@ import re
import sys
try:
import json
try:
import simplejson as json
except ImportError, e:
if sys.hexversion >= 0x20600f0:
import json
else:
raise e
except ImportError:
print >> sys.stderr , " You don't appear to have json.py installed"
print >> sys.stderr , " You don't appear to have simplejson.py installed"
print >> sys.stderr , " (an implementation of a JSON reader and writer in Python)."
print >> sys.stderr , " You can install it:"
print >> sys.stderr , " - by running 'apt-get install python-json' on Debian-based systems,"
print >> sys.stderr , " - by running 'yum install python-json' on Fedora/Red Hat system,"
print >> sys.stderr , " - from sources from 'http://sourceforge.net/projects/json-py'"
print >> sys.stderr , " - by running 'apt-get install python-simplejson' on Debian-based systems,"
print >> sys.stderr , " - by running 'yum install python-simplejson' on Fedora/Red Hat system,"
print >> sys.stderr , " - from sources from 'http://pypi.python.org/pypi/simplejson'"
print >> sys.stderr , " - simplejson is a standard json library in the Python core since 2.6"
sys.exit(1)
def insert_base_types(d):
@ -45,7 +52,7 @@ def insert_base_types(d):
class AmqpSpec:
def __init__(self, filename):
self.spec = json.read(file(filename).read())
self.spec = json.load(file(filename))
self.major = self.spec['major-version']
self.minor = self.spec['minor-version']