Replace the '$DIR' only when found in the binary directory string.

pull/3/head
Murtuza Zabuawala 2017-04-03 18:32:26 +05:30 committed by Ashesh Vashi
parent e7cee870a7
commit 74655e60a0
1 changed files with 3 additions and 2 deletions

View File

@ -112,8 +112,9 @@ class ServerType(object):
operation
))
)
bin_path = self.utility_path.get().replace("$DIR", os.path.dirname(sys.modules['__main__'].__file__))
bin_path = self.utility_path.get()
if "$DIR" in bin_path:
bin_path = bin_path.replace("$DIR", os.path.dirname(sys.modules['__main__'].__file__))
return os.path.abspath(os.path.join(
bin_path,