solves issue completely for tap
@@ -366,7 +366,7 @@ class Tap(object):
return None
jobid = jobs[0].get_jobid()
if jobid is None:
- print("No job identifier found")
+ log.info("No job identifier found")
return None
subContext = "async/" + str(jobid)
response = self.__connHandler.execute_get(subContext)
@@ -377,7 +377,7 @@ class Tap(object):
verbose,
200)
if isError:
- print(response.reason)
+ log.info(response.reason)
raise requests.exceptions.HTTPError(response.reason)
return None
# parse job
@@ -409,7 +409,7 @@ class Tap(object):
verbose,
200)
if isError:
- print(response.reason)
+ log.info(response.reason)
raise requests.exceptions.HTTPError(response.reason)
return None
# parse jobs
@@ -674,20 +674,20 @@ class TapPlus(Tap):
-------
A table object
"""
- print("Retrieving table '"+str(table)+"'")
+ log.info("Retrieving table '"+str(table)+"'")
connHandler = self.__getconnhandler()
response = connHandler.execute_get("tables?tables="+table)
if verbose:
print(response.status, response.reason)
isError = connHandler.check_launch_response_status(response, verbose, 200)
if isError:
- print(response.status, response.reason)
+ log.info(response.status, response.reason)
raise requests.exceptions.HTTPError(response.reason)
return None
- print("Parsing table '"+str(table)+"'...")
+ log.info("Parsing table '"+str(table)+"'...")
tsp = TableSaxParser()
tsp.parseData(response)
- print("Done.")
+ log.info("Done.")
return tsp.get_table()
def search_async_jobs(self, jobfilter=None, verbose=False):
@@ -719,7 +719,7 @@ class TapPlus(Tap):
verbose,
200)
if isError:
- print(response.reason)
+ log.info(response.reason)
raise requests.exceptions.HTTPError(response.reason)
return None
# parse jobs
@@ -761,7 +761,7 @@ class TapPlus(Tap):
print(response.getheaders())
isError = connHandler.check_launch_response_status(response, verbose, 200)
if isError:
- print(response.reason)
+ log.info(response.reason)
raise requests.exceptions.HTTPError(response.reason)
def login(self, user=None, password=None, credentials_file=None,
@@ -788,10 +788,10 @@ class TapPlus(Tap):
user = ins.readline().strip()
password = ins.readline().strip()
if user is None:
- print("Invalid user name")
+ log.info("Invalid user name")
return
if password is None:
- print("Invalid password")
+ log.info("Invalid password")
return
self.__user = user
self.__pwd = password
@@ -826,7 +826,7 @@ class TapPlus(Tap):
verbose,
200)
if isError:
- print("Login error: " + str(response.reason))
+ log.info("Login error: " + str(response.reason))
raise requests.exceptions.HTTPError("Login error: " + str(response.reason))
else:
# extract cookie
