From 5d64231c94e9e58bd9f8400330ae5c7d40a2f28c Mon Sep 17 00:00:00 2001 From: Nicolas Leclerc Date: Fri, 27 Apr 2018 13:34:06 +0200 Subject: [PATCH] Add strip to remove '\n' kept by readline --- astroquery/utils/tap/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astroquery/utils/tap/core.py b/astroquery/utils/tap/core.py index 97fe7d1de3..ca536682cd 100755 --- a/astroquery/utils/tap/core.py +++ b/astroquery/utils/tap/core.py @@ -783,8 +783,8 @@ def login(self, user=None, password=None, credentials_file=None, if credentials_file is not None: # read file: get user & password with open(credentials_file, "r") as ins: - user = ins.readline() - password = ins.readline() + user = ins.readline().strip() + password = ins.readline().strip() if user is None: print("Invalid user name") return