mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Fixed ModuleNotFoundError when running setup.py to load/dump servers. Fixes #7663
Patch Sent By: Karl Maximilian Daenner
This commit is contained in:
parent
7c729d5f0e
commit
71c962f51c
@ -28,3 +28,4 @@ Bug fixes
|
||||
| `Issue #7644 <https://redmine.postgresql.org/issues/7644>`_ - Ensure that the dump servers functionality works from setup.py.
|
||||
| `Issue #7646 <https://redmine.postgresql.org/issues/7646>`_ - Ensure that the Import/Export server menu option is visible.
|
||||
| `Issue #7648 <https://redmine.postgresql.org/issues/7648>`_ - Fixed API test case for change password in the server mode.
|
||||
| `Issue #7663 <https://redmine.postgresql.org/issues/7663>`_ - Fixed ModuleNotFoundError when running setup.py to load/dump servers.
|
||||
|
13
web/setup.py
13
web/setup.py
@ -13,6 +13,13 @@ and settings database."""
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
# We need to include the root directory in sys.path to ensure that we can
|
||||
# find everything we need when running in the standalone runtime.
|
||||
root = os.path.dirname(os.path.realpath(__file__))
|
||||
if sys.path[0] != root:
|
||||
sys.path.insert(0, root)
|
||||
|
||||
import builtins
|
||||
import config
|
||||
|
||||
@ -22,12 +29,6 @@ if 'SERVER_MODE' in globals():
|
||||
else:
|
||||
builtins.SERVER_MODE = None
|
||||
|
||||
# We need to include the root directory in sys.path to ensure that we can
|
||||
# find everything we need when running in the standalone runtime.
|
||||
root = os.path.dirname(os.path.realpath(__file__))
|
||||
if sys.path[0] != root:
|
||||
sys.path.insert(0, root)
|
||||
|
||||
from pgadmin.model import db, Version, SCHEMA_VERSION as CURRENT_SCHEMA_VERSION
|
||||
from pgadmin import create_app
|
||||
from pgadmin.utils import clear_database_servers, dump_database_servers,\
|
||||
|
Loading…
Reference in New Issue
Block a user