Skip to content

Commit

Permalink
fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgckind committed May 23, 2017
1 parent b83844a commit d5cc31b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions easyaccess/config_ea.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ def get_desconfig(desfile, db, verbose=True, user=None, pw1=None):
configwrite = True
if db == 'db-dessci':
kwargs = {'host': server_2, 'port': port_n, 'service_name': 'dessci'}
elif db == 'db-oldsci':
kwargs = {'host': server_n, 'port': port_n, 'service_name': 'dessci'}
else:
kwargs = {'host': server_n, 'port': port_n, 'service_name': db[3:]}
dsn = cx_Oracle.makedsn(**kwargs)
Expand Down Expand Up @@ -261,6 +263,13 @@ def get_desconfig(desfile, db, verbose=True, user=None, pw1=None):
if not config.has_option(db, 'server'):
configwrite = True
config.set(db, 'server', server_2)
if db == 'db-oldsci':
if not config.has_option(db, 'name'):
configwrite = True
config.set(db, 'name', 'dessci')
if not config.has_option(db, 'server'):
configwrite = True
config.set(db, 'server', server_n)
else:
if not config.has_option(db, 'name'):
configwrite = True
Expand Down

0 comments on commit d5cc31b

Please sign in to comment.