개정판 f5f8e09f
#1197
Using 구문 수정
Change-Id: I19b658709edc7962809931ee719aaae7a9b0a451
HYTOS/HYTOS/AppDocData.py | ||
---|---|---|
330 | 330 |
else: |
331 | 331 |
pass |
332 | 332 |
|
333 |
for sqlFile in sqlFiles: |
|
334 |
filePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Scripts', sqlFile) |
|
335 |
try: |
|
336 |
file = QFile(filePath) |
|
337 |
file.open(QFile.ReadOnly) |
|
338 |
sql = file.readAll() |
|
339 |
sql = str(sql, encoding='utf8') |
|
340 |
cursor.executescript(sql) |
|
341 |
finally: |
|
342 |
file.close() |
|
333 |
for sqlFile in sqlFiles:
|
|
334 |
filePath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Scripts', sqlFile)
|
|
335 |
try:
|
|
336 |
file = QFile(filePath)
|
|
337 |
file.open(QFile.ReadOnly)
|
|
338 |
sql = file.readAll()
|
|
339 |
sql = str(sql, encoding='utf8')
|
|
340 |
cursor.executescript(sql)
|
|
341 |
finally:
|
|
342 |
file.close()
|
|
343 | 343 |
|
344 |
conn.commit() |
|
344 |
conn.commit()
|
|
345 | 345 |
|
346 | 346 |
return True |
347 | 347 |
# Catch the exception |
내보내기 Unified diff