|
34 | 34 | __all__ = ['Tap', 'TapPlus']
|
35 | 35 |
|
36 | 36 | VERSION = "20200428.1"
|
37 |
| -TAP_CLIENT_ID = f"aqtappy1-{VERSION}" |
38 | 37 |
|
39 | 38 |
|
40 | 39 | class Tap:
|
@@ -138,6 +137,7 @@ def __init__(self, url=None,
|
138 | 137 |
|
139 | 138 | def __internalInit(self):
|
140 | 139 | self.__connHandler = None
|
| 140 | + self.tap_client_id = f"aqtappy1-{VERSION}" |
141 | 141 |
|
142 | 142 | def load_tables(self, verbose=False):
|
143 | 143 | """Loads all public tables
|
@@ -585,7 +585,7 @@ def __launchJobMultipart(self, query, uploadResource, uploadTableName,
|
585 | 585 | "REQUEST": "doQuery",
|
586 | 586 | "LANG": "ADQL",
|
587 | 587 | "FORMAT": str(outputFormat),
|
588 |
| - "tapclient": str(TAP_CLIENT_ID), |
| 588 | + "tapclient": str(self.tap_client_id), |
589 | 589 | "QUERY": str(query),
|
590 | 590 | "UPLOAD": "" + str(uploadValue)}
|
591 | 591 | if maxrec is not None:
|
@@ -625,7 +625,7 @@ def __launchJob(self, query, outputFormat, context, verbose, name=None,
|
625 | 625 | "REQUEST": "doQuery",
|
626 | 626 | "LANG": "ADQL",
|
627 | 627 | "FORMAT": str(outputFormat),
|
628 |
| - "tapclient": str(TAP_CLIENT_ID), |
| 628 | + "tapclient": str(self.tap_client_id), |
629 | 629 | "QUERY": str(query)}
|
630 | 630 | if maxrec is not None:
|
631 | 631 | args['MAXREC'] = maxrec
|
@@ -799,11 +799,9 @@ def __internalInit(self):
|
799 | 799 | self.__pwd = None
|
800 | 800 | self.__isLoggedIn = False
|
801 | 801 |
|
802 |
| - @staticmethod |
803 |
| - def __set_client_id(client_id): |
| 802 | + def __set_client_id(self, client_id): |
804 | 803 | if client_id:
|
805 |
| - global TAP_CLIENT_ID |
806 |
| - TAP_CLIENT_ID = client_id |
| 804 | + self.tap_client_id = client_id |
807 | 805 |
|
808 | 806 | def load_tables(self, only_names=False, include_shared_tables=False,
|
809 | 807 | verbose=False):
|
|
0 commit comments