Skip to content
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

Allow running with empty proxies file #5

Merged
merged 1 commit into from
Aug 22, 2016
Merged

Conversation

karlicoss
Copy link
Contributor

@karlicoss karlicoss commented Aug 21, 2016

Right now if you run the script and don't specify the proxies, it results in "Illegal JSON format in file 'proxies.json'." (unless you delete the proxies config). I guess it would make sense to make the script work without removing the file :)

@@ -0,0 +1,2 @@
{
Copy link
Owner

@dixudx dixudx Aug 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've created an empty valid json file here. I forgot to add the braces.

@dixudx dixudx merged commit 3c1afaa into dixudx:master Aug 22, 2016
@dixudx
Copy link
Owner

dixudx commented Aug 22, 2016

@karlicoss Thanks for your patch and work.

    if os.path.exists("./proxies.json"):
        with open("./proxies.json", "r") as fj:
            try:

Actually the script will first check whether there is a proxies.json file in the same directory. I created an empty proxies.json file (containing no braces), which is not legal for json format.

Thanks for the updating.

Merged.

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

Successfully merging this pull request may close these issues.

2 participants