Steven Black
ea43296b84
Remove initialized but thereafter unused variables.
2016-02-07 20:25:33 -05:00
Steven Black
d167327b2a
Added local pylint directives.
2016-02-07 20:09:42 -05:00
Steven Black
5dfa76790d
Going with pylint's recommendation for singleton comparisons.
2016-02-07 19:41:44 -05:00
Steven Black
ff682e2a0d
Standardize on double quotes in print() calls everywhere.
2016-02-07 19:37:27 -05:00
Steven Black
b3e770c4b4
Split long code lines.
2016-02-07 19:34:27 -05:00
Steven Black
708d5a9dad
Removed more superfluous parens.
2016-02-07 19:32:00 -05:00
Steven Black
eb00a6ca08
Removed unnecessary semicolons.
2016-02-07 19:28:31 -05:00
Steven Black
873cb4c0d4
Split long code line.
2016-02-07 19:25:32 -05:00
Steven Black
066ae7893c
Removed superfluous parens.
2016-02-07 19:23:40 -05:00
Steven Black
ed144fcd58
Split long code line.
2016-02-07 19:20:29 -05:00
Steven Black
204c825080
Removed spaces after '(' and before ')'.
2016-02-07 19:18:16 -05:00
Steven Black
72326608a5
Indent with spaces.
2016-02-07 19:15:05 -05:00
Steven Black
ad2c8e8558
Revert "Variable 'target' is never used."
...
This reverts commit 3d281af027
.
2016-02-07 15:53:37 -05:00
Steven Black
3d281af027
Variable 'target' is never used.
2016-02-07 15:35:36 -05:00
FadeMind
facba836c4
automatic systemd NetworkManager service restart
2016-01-29 15:02:22 +01:00
Steven Black
eeb6c54b13
Better handling of download errors.
2016-01-02 18:57:23 -05:00
Steven Black
9bf03dd7c9
Add at the top.
2015-11-23 09:07:36 -05:00
FrancoGag
459fb01471
Don't print '::1 localhost'
2015-11-21 10:19:25 -03:00
Steven Black
a7c73805eb
Fix IndentationError.
2015-11-20 22:12:57 -05:00
Steven Black
d372865698
Refactor: whitespace for consistency and readability.
2015-11-20 22:10:49 -05:00
Steven Black
e35ca1ecae
Merge pull request #45 from hd074/master
...
hotfix for duplicates and artefacts
2015-11-20 21:09:39 -05:00
Hannes Domschke
2b18fa1e1a
better delete after updating so we dont end up with an empty hosts file if update goes wrong and causes a crash
2015-11-15 23:23:06 +01:00
Hannes Domschke
5f2bb91173
hotfix for duplicates and artefacts
2015-11-15 22:38:07 +01:00
Franco Gagliardi
cdaffa0202
Removed sys.exit()
2015-11-15 16:19:53 -03:00
Franco Gagliardi
0b0988eeef
Check if 'hosts' file exists
...
We need to check that the file exists before trying to update it, and if it doesn't we try to create an empty 'hosts' file.
2015-11-14 22:32:17 -03:00
Steven Black
845bad283a
Why list the local data file name. I don't get it.
2015-11-09 23:10:42 -05:00
Steven Black
544490e99a
Not happy with the way this lists not the source URLS, but the local file names.
2015-11-09 23:03:23 -05:00
Steven Black
c0766a4e87
Better handle the no-domain-in-the-line error in data. This closes #38 .
2015-11-09 23:00:37 -05:00
FrancoGag
d1dba20663
Renamed removeDups() to removeDupsAndExcl()
...
Renamed removeDups() to reflect that now the function also excludes domains and keywords in the whitelist.
2015-11-09 17:09:59 -03:00
FrancoGag
e1d41823bd
Fixed: Exclude domains in the whitelist (2)
...
Now it probably works with Python 3 and the code is much cleaner.
2015-11-07 17:54:36 -03:00
FrancoGag
6a07a22b61
Fixed: Exclude domains in the whitelist
...
It still can be improved but now it's working as it should.
Not tested with Python 3. Working with Python 2.7.10
2015-11-07 17:01:55 -03:00
FrancoGag
461b06710c
Exclude domains contained in a whitelist
2015-11-05 10:44:42 -03:00
FrancoGag
091a18ee8d
Update updateHostsFile.py
2015-11-05 09:38:08 -03:00
FrancoGag
45fa325d42
Delete .DS_Store from Data
...
If the Data folder is opened in OSX it creates a .DS_Store file and the python script tries to use it a source and returns errors, deleting it solves this issue.
2015-11-04 11:47:55 -03:00
Steven Black
90ad37d6fc
Merge pull request #34 from qutorial/myhosts
...
Update to include preamble handling
2015-10-30 11:05:59 -04:00
Zaur Molotnikov
05eef7214c
Fixed ubuntu hosts file relaod
2015-10-30 11:18:08 +01:00
Zaur Molotnikov
7934f87b41
Update to include preamble handling
2015-10-30 11:13:21 +01:00
Steven Black
aa8b9508e0
File is unavailable. Don't raise this error; just eat it.
2015-10-28 19:33:59 -04:00
Steven Black
1e24a1996f
Trim whitespace in updateHostsFile.py
2015-10-28 19:33:16 -04:00
Zaur Molotnikov
d516616750
Cross-python implementation
2015-10-27 00:29:53 +01:00
Zaur Molotnikov
6f6693c17a
Migrated to Python 3
2015-10-26 23:16:55 +01:00
qqo
10c4449774
'suffix' in regex matches empty string on all the data files, except
...
one (incorrect) line containing port:
0.0.0.0 telemetry.appex.bing.net:443
The resulting entry in hosts file generated like this:
0.0.0.0 telemetry.appex.bing.net :443
which is incorrect. The bug was not spotted only because the incorrect
line in the data source was after the correct line without port,
thus it was ignored and not added to resulting hosts file.
2015-10-24 01:43:18 +03:00
qqo
d810d25178
Explicitly lowercase hostname to prevent mixed-case duplicates.
2015-10-24 00:58:12 +03:00
Zaur Molotnikov
7e8b1674fb
os.path.join introduced
2015-10-19 12:27:41 +02:00
Steven Black
cdb945e45e
Prettier formatting of the number of host records.
2015-10-17 20:23:33 -04:00
Steven Black
4998b31f24
Host file now lists 127.0.0.1 localhost, 0.0.0.0 the others.
2015-10-06 17:05:09 -04:00
Steven Black
da11d3239c
Reverting the target host back to 0.0.0.0.
2015-10-02 21:06:51 -04:00
Steven Black
71499a4153
Fix the update script so we don't write any dupes.
...
Signed-off-by: Steven Black <steveb@stevenblack.com>
2015-09-23 23:55:36 -04:00
Steven Black
a03314573c
Replace the target host from 0.0.0.0
with 0
.
2015-09-23 19:02:26 -04:00
Steven Black
f5d622a413
Issue #8 : fix - Update the stripRule() function to be smarter about whitespace preceding comments. Thanks @caneylan.
2015-01-01 21:35:11 -05:00