Permalink
Browse files

fixed MW-1729 - [MIGRATION] Wrong wbcopytables path in sh file

  • Loading branch information...
1 parent 53a57db commit 1e957e9bbe996a9e45fbae403c15b3f4fadfd363 @mbodzek mbodzek committed Oct 14, 2016
Showing with 12 additions and 4 deletions.
  1. +12 −4 plugins/migration/backend/migration.py
@@ -420,14 +420,22 @@ def __init__(self):
self.wbcopytables_path_bin = os.path.join(os.path.dirname(grt.root.wb.registry.appExecutablePath), "wbcopytables-bin")
if not os.path.exists(self.wbcopytables_path_bin):
self.wbcopytables_path_bin = "wbcopytables-bin"
- if type(self.wbcopytables_path_bin) == unicode:
- self.wbcopytables_path_bin = self.wbcopytables_path_bin.encode("UTF-8")
- if "linux" in sys.platform and os.path.exists(self.wbcopytables_path_bin[:-4]):
- self.wbcopytables_path = self.wbcopytables_path_bin[:-4]
+ if "linux" in sys.platform:
+ self.wbcopytables_path = mforms.App.get().get_executable_path("wbcopytables")
+ if not os.path.exists(self.wbcopytables_path):
+ self.wbcopytables_path = os.path.join(os.path.dirname(grt.root.wb.registry.appExecutablePath), "wbcopytables")
+ if not os.path.exists(self.wbcopytables_path):
+ self.wbcopytables_path = "wbcopytables"
else:
self.wbcopytables_path = self.wbcopytables_path_bin
+ if type(self.wbcopytables_path_bin) == unicode:
+ self.wbcopytables_path_bin = self.wbcopytables_path_bin.encode("UTF-8")
+
+ if type(self.wbcopytables_path) == unicode:
+ self.wbcopytables_path = self.wbcopytables_path.encode("UTF-8")
+
def close(self):
if self.migrationSource:
self.migrationSource.cleanup()

0 comments on commit 1e957e9

Please sign in to comment.