mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-02 20:30:17 -06:00
Ensure builtins.SERVER_MODE is handled if running setup.py standalone.
This commit is contained in:
1 parent
507d8b3fe4
commit
a65f7b330b
1 file changed
+10
@@ -13,6 +13,16 @@ and settings database."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
import builtins
|
||||
else:
|
||||
import __builtin__ as builtins
|
||||
|
||||
# Grab the SERVER_MODE if it's been set by the runtime
|
||||
if 'SERVER_MODE' in globals():
|
||||
builtins.SERVER_MODE = globals()['SERVER_MODE']
|
||||
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.
|
||||
|
||||
Reference in new issue
Block a user