File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
reportportal_client/_local Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 10
10
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License
13
+ """Report Portal client context storing and retrieving module"""
13
14
from threading import local
14
15
15
16
16
17
__INSTANCES = local ()
17
18
18
19
19
20
def current ():
21
+ """Return current Report Portal client which is used by the current thread.
22
+ """
20
23
if hasattr (__INSTANCES , 'current' ):
21
24
return __INSTANCES .current
22
25
23
26
24
27
def set_current (client ):
28
+ """Save Report Portal client as current.
29
+
30
+ The method is not intended to use used by users. Report Portal client calls
31
+ it itself when new client is created.
32
+
33
+ :param client: Report Portal client
34
+ """
25
35
__INSTANCES .current = client
You can’t perform that action at this time.
0 commit comments