Require v1.1 of the pldbgapi extension to debug on EPAS 11.

This commit is contained in:
Akshay Joshi 2018-06-25 16:01:53 +01:00 committed by Dave Page
parent 57c054fb0e
commit cf29e8df90

View File

@ -671,6 +671,22 @@ def initialize_target(debug_type, sid, did, scid, func_id, tri_id=None):
current_app.logger.debug(msg) current_app.logger.debug(msg)
return internal_server_error(msg) return internal_server_error(msg)
# Check debugger extension version for EPAS 11 and above.
# If it is 1.0 then return error to upgrade the extension.
if manager.server_type == 'ppas' and manager.sversion >= 11000:
status, ext_version = conn.execute_scalar(
"SELECT installed_version FROM pg_catalog.pg_available_extensions "
"WHERE name = 'pldbgapi'"
)
if not status:
return internal_server_error(errormsg=ext_version)
else:
if float(ext_version) < 1.1:
return internal_server_error(
errormsg=gettext("Please upgrade the pldbgapi extension"
"to 1.1 or above and try again."))
# Set the template path required to read the sql files # Set the template path required to read the sql files
template_path = 'debugger/sql' template_path = 'debugger/sql'