47 Commits
Author SHA1 Message Date
gfyoung 24f7482fc6 Remove unnecessary reset_mock calls 2020-08-09 00:42:24 -07:00
gfyoung ab1bbe7b53 Extract flake8 config in setup.cfg
Now you can just run "flake8" when linting
2020-08-09 00:22:23 -07:00
gfyoung 92442955bc Minor house-cleaning
* No parentheses single-line string
* Remove builtins function, which was
really for Python 2.x compatibility
2018-09-06 21:12:48 -07:00
gfyoung e99c7bbf44 Update docs to say we support Python 3.5+
Python 3.5 and 3.6 are still alive and well supported.
2018-09-06 17:15:33 -07:00
gfyoung d8df5f1dc4 Use example files to allow proper git-ignoring
The following files:

* myhosts
* blacklist
* whitelist

can be all be modified by the user for personal usage.
However, git is tracking these files since they exist
in the repository, which makes it difficult to do so
without accidentally pushing one's own customizations.

This commit converts those examples to ".example" files,
which serve as the defaults if one of the files listed
above does not exist.

Closes gh-144.
2018-09-06 12:20:37 -07:00
gfyoung a2a7d12448 Skip flake8 check on Python on 2.7
flake8 is broken with Python 2.7, but
we have all other builds linting, so
not an issue for us.
2018-08-07 00:14:56 -07:00
gfyoung 8062b28490 Add docs for DNS cache for FreeBSD
Closes gh-157.
2018-08-03 10:43:37 -07:00
gfyoung e66c2cb37e Doc / Check for Centos restart
Closes gh-622.
2018-05-22 21:53:56 -04:00
gfyoung e3224e5415 Update LICENSE and CI
1) It's 2018
2) conda update --all no longer applies to conda itself.
   conda update conda needs to be explicitly called.
2018-01-10 09:52:59 -08:00
gfyoung 9e72dfc455 Minor spelling fixes to README template 2017-08-21 10:32:37 -07:00
gfyoung 262ad95791 Fix flake8 errors in updateReadme.py
xref commit 8fb2df
2017-08-20 11:58:16 -07:00
gfyoung 24ab22e139 Refactor out source data updating 2017-08-20 11:52:28 -07:00
gfyoung f83a56d317 Refactor out global settings usage in update logic 2017-08-09 08:13:22 -07:00
gfyoung 942069db81 Refactor out global settings usage in exclusions 2017-08-07 08:43:47 -07:00
gfyoung 50dd78f74d Add Python 3.5 testing to Travis 2017-08-02 20:57:11 -07:00
gfyoung 4b96f3f34a Refactor out global settings usage in user prompt 2017-07-13 08:20:03 -07:00
gfyoung 97963aea4f Rename Travis CI scripts 2017-07-10 20:27:48 -07:00
gfyoung 65eb217353 Drop nose dependency on Travis
Nose is not a well-supported library anymore.
Let's just use Python's builtin unittest library.
2017-07-09 20:26:12 -07:00
gfyoung 415b89a022 Reduce dependency on global settings variable
Global variables make code less modular
and therefore more difficult to test.
2017-07-03 18:42:15 -07:00
gfyoung d1ecc7bdd6 Add OSX to Travis matrix 2017-06-28 21:18:50 -07:00
gfyoung dce24af399 Add unittests for updateHostsFile.py 2017-06-28 20:13:01 -07:00
gfyoung 2d6a8676a4 Check if terminal supports color
Closes gh-151.
2017-05-28 12:40:32 -04:00
gfyoung 3b581ce782 Refactor DNS cache flushing for Linux 2017-05-28 12:40:25 -04:00
gfyoung 51a0ec21bd Document all functions in Python scripts 2017-05-23 21:58:22 -04:00
gfyoung 2aecbf9707 Concatenate str only in os.path.join
Closes gh-316.
2017-05-22 23:31:35 -04:00
gfyoung 8806131c74 Check /usr/lib and /lib for systemd
Closes gh-321.
2017-05-22 21:19:31 -04:00
gfyoung 90afb0c623 Create makeHosts file in Python
Closes gh-316.
2017-05-21 22:30:36 -04:00
gfyoung 8f3e71e327 Wrap os.path.join to handle LOCALE issues
Closes gh-81.
Closes gh-318.
2017-05-21 21:51:13 -04:00
gfyoung c8e8ddee6c Wrap os.path.join to handle LOCALE issues
Closes gh-81.
2017-05-19 16:27:12 -04:00
gfyoung b3838ef2d2 Add DNS cache flushing calls for Linux
1) Add command for Linux Mint
2) Add additional command for NCSD cache

Closes gh-128.
2017-05-18 11:30:23 -04:00
gfyoung 8cb610a757 Don't crash if data source unreachable
Closes gh-26.
2017-05-18 00:17:11 -04:00
gfyoung 931f69ff22 Reorganize cross-platform instructions for repo usage 2017-05-17 23:04:30 -04:00
gfyoung 96c7287584 Lift restriction on Python 3.x for makeHosts* 2017-05-17 02:35:46 -04:00
gfyoung eed24ab456 Lift Python 3.5.x restriction on updateHostsWindows.bat 2017-05-16 13:47:54 -04:00
gfyoung fe963d599a Add Travis SVG to README 2017-05-15 20:45:39 -04:00
gfyoung 7aad916f71 Add Travis for style checking
Closes gh-298.
2017-05-15 20:30:01 -04:00
gfyoung dfe66197f5 Patch all style errors in updateReadme.py 2017-05-15 15:13:39 -04:00
gfyoung 26cac85ca3 Patch all style errors in updateHostsFile.py 2017-05-15 15:00:16 -04:00
gfyoung 21dd1d9d56 Standardize underscore names in updateHostsFile.py 2017-05-15 13:32:39 -04:00
gfyoung 0015363385 Condense Python 2-3 compatibility code 2017-05-14 22:30:36 -04:00
gfyoung 190592577d Condense exclusion customization logic 2017-05-14 22:10:19 -04:00
gfyoung ceb3765d24 Flush DNS cache on Windows 2017-05-14 22:07:43 -04:00
gfyoung 118a8e78a5 Remove unnecessary space between print and parenthesis 2017-05-14 14:54:24 -04:00
gfyoung 5830bb8db0 Have query_yes_no return boolean
Bugs have been found where we assumed
that query_yes_no returned True/False.
Not only is it easier to check booleans
instead of strings, but it also looks
a lot cleaner in the code.
2017-05-14 00:15:58 -04:00
gfyoung de2e45e8b2 Remove unnecessary imports in updateHostsFile.py 2017-05-13 23:43:00 -04:00
gfyoung 5799113f2c Add .idea and .iml to .gitignore 2017-05-08 01:13:56 -04:00
gfyoung bdce1217bb Patch response checking in promptForFlushDnsCache
Previously, it was checking if query_yes_no returned
False, which does not happen, as the function only
returns "yes" or "no". As a result, the check was
always returning True, even when the user did not
want to flush the DNS cache.
2017-05-08 01:10:40 -04:00