When running pgAdmin as a WSGI application, we will not be able to find
the '__main__' module under 'sys.modules'.pull/3/head
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