File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ def inner():
85
85
@hubmethod
86
86
def flush (timeout = None , callback = None ):
87
87
hub = Hub .current
88
- if hub is not None and hub . client is not None :
89
- return hub .client . flush (timeout = timeout , callback = callback )
88
+ if hub is not None :
89
+ return hub .flush (timeout = timeout , callback = callback )
90
90
91
91
92
92
@hubmethod
Original file line number Diff line number Diff line change @@ -338,6 +338,12 @@ def inner():
338
338
339
339
return inner ()
340
340
341
+ def flush (self , timeout = None , callback = None ):
342
+ """Alias for self.client.flush"""
343
+ client , scope = self ._stack [- 1 ]
344
+ if client is not None :
345
+ return client .flush (timeout = timeout , callback = callback )
346
+
341
347
342
348
GLOBAL_HUB = Hub ()
343
349
_local .set (GLOBAL_HUB )
You can’t perform that action at this time.
0 commit comments