Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 25, 2022. It is now read-only.

Website blocker and un-blocker #159

Closed
logan-mo wants to merge 4 commits into Python-World:master from logan-mo:master
Closed

Website blocker and un-blocker #159

logan-mo wants to merge 4 commits into Python-World:master from logan-mo:master

Conversation

Copy link
Contributor

@logan-mo logan-mo commented Aug 16, 2020

Fixed the indentation error and made Linux compatible. Please review.

Blocks the specified websites and unblocks them as well.
1) Removed the indent error
2) Made linux compatible
elif platform.system() == "Linux":
pathToHosts=r"~\etc\hosts"

pathToHosts=r"C:\Windows\System32\drivers\etc\hosts"
Copy link
Contributor

@kana800 kana800 Aug 16, 2020
edited
Loading

Choose a reason for hiding this comment

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

Remove this, what happen right now is if the platform is linux, pathToHosts will be the windows directory

if platform.system() == "Windows":
pathToHosts=r"C:\Windows\System32\drivers\etc\hosts"
elif platform.system() == "Linux":
pathToHosts=r"~\etc\hosts"
Copy link
Contributor

Choose a reason for hiding this comment

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

like mentioned earlier, slashes should be the other way
Change it to pathToHosts=r"/etc/hosts"

Copy link
Contributor

@kana800 kana800 left a comment
edited
Loading

Choose a reason for hiding this comment

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

@Phillibob55 Great Work ! 😃 👍🏾
everything works fine for the linux platform !
when the changes are made.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Reviewers
1 more reviewer

@kana800 kana800 kana800 left review comments

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /