Skip to content

Commit

Permalink
Merge pull request #325 from rcoh/patch-1
Browse files Browse the repository at this point in the history
Allow timeout to be passed to session functions
  • Loading branch information
jeanphix authored May 3, 2017
2 parents a16f703 + 09106b2 commit d0f6c9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ghost/ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ def can_load_page(func):
@wraps(func)
def wrapper(self, *args, **kwargs):
expect_loading = kwargs.pop('expect_loading', False)

timeout = kwargs.pop('timeout', None)
if expect_loading:
self.loaded = False
func(self, *args, **kwargs)
return self.wait_for_page_loaded(
timeout=kwargs.pop('timeout', None))
timeout=timeout)
return func(self, *args, **kwargs)
return wrapper

Expand Down

0 comments on commit d0f6c9a

Please sign in to comment.