Skip to content

Commit

Permalink
Python2 support fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekmo committed Oct 21, 2018
1 parent 7c27f7f commit 02f0d08
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proxy_db/proxies.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import six

from proxy_db.exceptions import NoProvidersAvailable
from proxy_db.models import Proxy, create_session
from proxy_db.providers import PROVIDERS


class ProxiesList(object):
def __init__(self, country=None):
if isinstance(country, str):
if isinstance(country, six.string_types):
country = country.upper()
self.request_options = dict(
country=country,
Expand Down Expand Up @@ -47,3 +49,6 @@ def __next__(self):
else:
self.reload_provider()
return next(self)

def next(self):
return self.__next__()

0 comments on commit 02f0d08

Please sign in to comment.