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 unblocker #160

Merged
chavarera merged 5 commits into Python-World:master from logan-mo:master
Aug 26, 2020
Merged

Website blocker and unblocker #160

chavarera merged 5 commits into Python-World:master from logan-mo:master
Aug 26, 2020

Conversation

Copy link
Contributor

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

  • Fixed the slashes' direction for Linux path in both scripts.
  • removed the extra path assignment from the unblocker script.

Blocks the specified websites and unblocks them as well.
1) Removed the indent error
2) Made linux compatible
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.

same changes here it should be /etc/hosts

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.

get rid of ~ (tilde) sign this should be /etc/hosts

Copy link
Contributor

@kana800 kana800 left a comment

Choose a reason for hiding this comment

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

Your code works like charm!
you made a small typo @Phillibob55

Copy link
Contributor Author

Done.

Copy link
Contributor

@kana800 kana800 left a comment

Choose a reason for hiding this comment

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

The Code Works 👍🏾 😄

logan-mo reacted with heart emoji
Copy link
Member

The Code Works 👍🏾 smile

Thanks @kana800 for reviewing the code

@chavarera chavarera merged commit cbfb43e into Python-World:master Aug 26, 2020
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.

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