Skip to content

Commit 6c5b176

Browse files
committed
Fixed issue with new freetds connection string
1 parent 868c3e6 commit 6c5b176

File tree

4 files changed

+16
-122
lines changed

4 files changed

+16
-122
lines changed

odmtools/odmdata/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,12 @@
6363
'MemoryDatabase',
6464
'copy_series',
6565
'copy_data_value'
66-
]
66+
]
67+
68+
# pyinstaller needs pymysql, psycopg2, and pyodbc (If on windows)
69+
import sys
70+
if sys.platform is not 'darwin':
71+
import pymysql
72+
import psycopg2
73+
import pyodbc
74+

odmtools/odmservices/service_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def get_all_conn_dicts(self):
6161
def is_valid_connection(self):
6262
if self._current_conn_dict:
6363
conn_string = self._build_connection_string(self._current_conn_dict)
64+
logger.debug("Conn_string: %s" % conn_string)
6465
try:
6566
if self.testEngine(conn_string):
6667
return self.get_current_conn_dict()
@@ -187,7 +188,7 @@ def _get_file(self, mode):
187188

188189
def _build_connection_string(self, conn_dict):
189190
driver = ""
190-
if conn_dict['engine'] == 'mssql' and sys.platform is not 'win32':
191+
if conn_dict['engine'] == 'mssql' and sys.platform != 'win32':
191192
driver = "pyodbc"
192193
quoted = urllib.quote_plus('DRIVER={FreeTDS};DSN=%s;UID=%s;PWD=%s;' % (conn_dict['address'], conn_dict['user'], conn_dict['password']))
193194
conn_string = 'mssql+pyodbc:///?odbc_connect={}'.format(quoted)

setup/make.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def mac_pyinstaller():
104104
def run_inno():
105105
os.system(INNO_EXECUTABLE + " " + INNO_SCRIPT)
106106

107+
def run_no_installer():
108+
pass
109+
# zf = zipfile.ZipFile('')
110+
107111
def run_iceberg():
108112
os.system(ICE_EXECUTABLE + " "+ ICE_SCRIPT)
109113

@@ -113,8 +117,7 @@ def main():
113117
check_if_dirs_exist()
114118

115119
if sys.platform == 'win32':
116-
117-
120+
print "Creating Windows Executable..."
118121
if (run_pyinstaller()):
119122
run_inno()
120123

setup/windows_make.py

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)