-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Website blocker and unblocker #160
Conversation
Blocks the specified websites and unblocks them as well.
if platform.system() == "Windows": | ||
pathToHosts=r"C:\Windows\System32\drivers\etc\hosts" | ||
elif platform.system() == "Linux": | ||
pathToHosts=r"~/etc/hosts" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
There was a problem hiding this 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
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Code Works 👍🏾 😄
Thanks @kana800 for reviewing the code |
Uh oh!
There was an error while loading. Please reload this page.