AjithKSenthil commited on
Commit
3d80860
·
verified ·
1 Parent(s): 1ce9293

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +4 -4
chatbot.py CHANGED
@@ -12,8 +12,8 @@ DATABASE_URL = os.getenv('DATABASE_URL')
12
 
13
  # Parse the database URL
14
  result = urlparse(DATABASE_URL)
15
- username = result.username
16
- password = result.password
17
  database = result.path[1:]
18
  hostname = result.hostname
19
  port = result.port
@@ -23,8 +23,8 @@ def connect_db():
23
  try:
24
  conn = psycopg2.connect(
25
  dbname=database,
26
- user=username,
27
- password=password,
28
  host=hostname,
29
  port=port
30
  )
 
12
 
13
  # Parse the database URL
14
  result = urlparse(DATABASE_URL)
15
+ db_username = result.username
16
+ db_password = result.password
17
  database = result.path[1:]
18
  hostname = result.hostname
19
  port = result.port
 
23
  try:
24
  conn = psycopg2.connect(
25
  dbname=database,
26
+ user=db_username,
27
+ password=db_password,
28
  host=hostname,
29
  port=port
30
  )