Skip to content
Snippets Groups Projects
Commit 82411c01 authored by Simon Oehrl's avatar Simon Oehrl
Browse files

Remove newline

parent 9a429c28
No related branches found
No related tags found
No related merge requests found
Pipeline #163365 passed
...@@ -15,7 +15,7 @@ import psycopg2 ...@@ -15,7 +15,7 @@ import psycopg2
def ConnectToDatabase(postgres_username, postgres_password): def ConnectToDatabase(postgres_username, postgres_password):
database_host = 'database' database_host = 'database'
with open('database_host.txt') as database_host_file: with open('database_host.txt') as database_host_file:
database_host = database_host_file.readline() database_host = database_host_file.readline().rstrip('\n')
return psycopg2.connect(database="postgres", user="postgres", return psycopg2.connect(database="postgres", user="postgres",
password="postgres", host=database_host, port="5432") password="postgres", host=database_host, port="5432")
......
...@@ -17,7 +17,7 @@ import numpy as np ...@@ -17,7 +17,7 @@ import numpy as np
def connect_to_database(): def connect_to_database():
database_host = 'database' database_host = 'database'
with open('database_host.txt') as database_host_file: with open('database_host.txt') as database_host_file:
database_host = database_host_file.readline() database_host = database_host_file.readline().rstrip('\n')
return psycopg2.connect(database="postgres", user="postgres", return psycopg2.connect(database="postgres", user="postgres",
password="postgres", host=database_host, port="5432") password="postgres", host=database_host, port="5432")
......
...@@ -17,7 +17,7 @@ import numpy as np ...@@ -17,7 +17,7 @@ import numpy as np
def connect_to_database(): def connect_to_database():
database_host = 'database' database_host = 'database'
with open('database_host.txt') as database_host_file: with open('database_host.txt') as database_host_file:
database_host = database_host_file.readline() database_host = database_host_file.readline().rstrip('\n')
return psycopg2.connect(database="postgres", user="postgres", return psycopg2.connect(database="postgres", user="postgres",
password="postgres", host=database_host, port="5432") password="postgres", host=database_host, port="5432")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment