Skip to content

Pause in _retry_read_url should only happens from the second time #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
femtotrader opened this issue Aug 24, 2015 · 1 comment
Closed
Milestone

Comments

@femtotrader
Copy link
Contributor

Hi,

I noticed in utils.py in _retry_read_url this

def _retry_read_url(url, retry_count, pause, name):
    """
    Open url (and retry)
    """
    for _ in range(retry_count):
        time.sleep(pause)
        ...

So an unnecessary pause occured from begining (first request)

we might have something like:

def _retry_read_url(url, retry_count, pause, name):
    """
    Open url (and retry)
    """
    for i in range(retry_count):
        if i != 0:
            time.sleep(pause)
        ...
@femtotrader
Copy link
Contributor Author

same issue in yahoo/actions.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants