mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix a debugger error when using Python 2.7. Fixes #4419
Also fixes a minor bug where a reload warning was unnecessarily given when closing the debugger.
This commit is contained in:
committed by
Dave Page
parent
232fe286ee
commit
3dadb8989b
@@ -1541,8 +1541,6 @@ define([
|
||||
});
|
||||
this.panels = [];
|
||||
|
||||
pgBrowser.bind_beforeunload();
|
||||
|
||||
// Below code will be executed for indirect debugging
|
||||
// indirect debugging - 0 and for direct debugging - 1
|
||||
if (trans_id != undefined && !debug_type) {
|
||||
@@ -1853,6 +1851,7 @@ define([
|
||||
* instead, a poller is set up who will check
|
||||
*/
|
||||
if(self.preferences.debugger_new_browser_tab) {
|
||||
pgBrowser.bind_beforeunload();
|
||||
let pollIntervalId = setInterval(()=>{
|
||||
if(window.opener && window.opener.pgAdmin) {
|
||||
self.reflectPreferences();
|
||||
|
||||
@@ -14,12 +14,12 @@ import random
|
||||
debugger_sessions_lock = Lock()
|
||||
|
||||
|
||||
class DebuggerInstance:
|
||||
class DebuggerInstance(object):
|
||||
def __init__(self, trans_id=None):
|
||||
if trans_id is None:
|
||||
self._trans_id = str(random.randint(1, 9999999))
|
||||
else:
|
||||
self._trans_id = trans_id
|
||||
self._trans_id = str(trans_id)
|
||||
|
||||
self._function_data = None
|
||||
self._debugger_data = None
|
||||
|
||||
Reference in New Issue
Block a user