summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-06-05 12:26:29 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-06-05 12:34:17 +0100
commit89169e6e53aaab9a0716b81e1660a4c49dc0cb16 (patch)
treedb5318f63b0604bad5bbd03bdb13cfe074241385 /scripts
parent75d84f0b25a9b165e3c2f6977f6726d9b010a173 (diff)
downloadpsycopg2-89169e6e53aaab9a0716b81e1660a4c49dc0cb16.tar.gz
Error codes updated to PG 10 beta 1
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make_errorcodes.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/make_errorcodes.py b/scripts/make_errorcodes.py
index 3f96453..73aeed9 100755
--- a/scripts/make_errorcodes.py
+++ b/scripts/make_errorcodes.py
@@ -35,7 +35,7 @@ def main():
# If you add a version to the list fix the docs (errorcodes.rst, err.rst)
classes, errors = fetch_errors(
['8.1', '8.2', '8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4', '9.5',
- '9.6'])
+ '9.6', '10 b1'])
f = open(filename, "w")
for line in file_start:
@@ -133,7 +133,7 @@ errors_sgml_url = \
errors_txt_url = \
"http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;" \
- "f=src/backend/utils/errcodes.txt;hb=REL%s_STABLE"
+ "f=src/backend/utils/errcodes.txt;hb=%s"
def fetch_errors(versions):
@@ -142,12 +142,16 @@ def fetch_errors(versions):
for version in versions:
print >> sys.stderr, version
- tver = tuple(map(int, version.split('.')))
+ tver = tuple(map(int, version.split()[0].split('.')))
if tver < (9, 1):
c1, e1 = parse_errors_sgml(errors_sgml_url % version)
else:
- c1, e1 = parse_errors_txt(
- errors_txt_url % version.replace('.', '_'))
+ # TODO: move to 10 stable when released.
+ if version == '10 b1':
+ tag = 'REL_10_BETA1'
+ else:
+ tag = 'REL%s_STABLE' % version.replace('.', '_')
+ c1, e1 = parse_errors_txt(errors_txt_url % tag)
classes.update(c1)
for c, cerrs in e1.iteritems():
errors[c].update(cerrs)