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():
8585@hubmethod
8686def flush (timeout = None , callback = None ):
8787 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 )
9090
9191
9292@hubmethod
Original file line number Diff line number Diff line change @@ -338,6 +338,12 @@ def inner():
338338
339339 return inner ()
340340
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+
341347
342348GLOBAL_HUB = Hub ()
343349_local .set (GLOBAL_HUB )
You can’t perform that action at this time.
0 commit comments