Skip to content

Commit 64edd8d

Browse files
Merge pull request danilochilene#19 from elias-neves93/master
Added parser argument "--port".
2 parents 248d612 + b88ff8b commit 64edd8d

File tree

3 files changed

+2848
-74
lines changed

3 files changed

+2848
-74
lines changed

pyora.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ def __init__(self):
542542
parser.add_argument('--password')
543543
parser.add_argument('--address')
544544
parser.add_argument('--database')
545+
parser.add_argument('--port')
545546

546547
subparsers = parser.add_subparsers()
547548

@@ -561,8 +562,9 @@ def db_connect(self):
561562
password = a.password
562563
address = a.address
563564
database = a.database
564-
self.db = cx_Oracle.connect("{0}/{1}@{2}/{3}".format(
565-
username, password, address, database))
565+
port = a.port
566+
self.db = cx_Oracle.connect("{0}/{1}@{2}:{3}/{4}".format(
567+
username, password, address, port, database))
566568
self.cur = self.db.cursor()
567569

568570
def db_close(self):

0 commit comments

Comments
 (0)