mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
When running pgAdmin as a WSGI application, we will not be able to find
the '__main__' module under 'sys.modules'.
This commit is contained in:
parent
74655e60a0
commit
b756407c3c
@ -113,7 +113,8 @@ class ServerType(object):
|
||||
))
|
||||
)
|
||||
bin_path = self.utility_path.get()
|
||||
if "$DIR" in bin_path:
|
||||
# AS WSGI application, we will not find the '__main__' module.
|
||||
if "__main__" in sys.modules:
|
||||
bin_path = bin_path.replace("$DIR", os.path.dirname(sys.modules['__main__'].__file__))
|
||||
|
||||
return os.path.abspath(os.path.join(
|
||||
|
Loading…
Reference in New Issue
Block a user