Skip to content

Commit

Permalink
Don't try to be fancier than we actually are (also fixes #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
anned20 committed Jun 22, 2019
1 parent e9d4590 commit 4204193
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions begoneads/begoneads.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ def install(sources, local_sources):
# Collect hosts for hosts file
remote_collector = RemoteCollector(sources)

print('Collecting and parsing remote hosts')
print('Collecting and parsing remote hosts')
remote_hosts = remote_collector.get_result()

print('Remote hosts collected')
print('Remote hosts collected')

local_hosts = ''

if local_sources:
# Collect local host files
local_collector = LocalCollector(local_sources)

print('Collecting and parsing local hosts')
print('Collecting and parsing local hosts')
local_hosts = local_collector.get_result()

print('Local hosts collected')
print('Local hosts collected')

hosts = '\n'.join([
remote_hosts,
Expand All @@ -100,16 +100,16 @@ def install(sources, local_sources):
else:
path = '/etc/hosts'

print('Parse current hosts file')
print('Parse current hosts file')
hosts_manager = HostsManager(path)

print('Applying new hosts')
print('Applying new hosts')
hosts_manager.apply_hosts(hosts)

print('Saving')
print('Saving')
hosts_manager.commit()

print('Hosts applied')
print('Hosts applied')


@cli.command('uninstall', short_help='Uninstall BeGoneAds')
Expand All @@ -124,16 +124,16 @@ def uninstall():
else:
path = '/etc/hosts'

print('Parse current hosts file')
print('Parse current hosts file')
hosts_manager = HostsManager(path)

print('Removing BeGoneAds')
print('Removing BeGoneAds')
hosts_manager.remove_begoneads()

print('Saving')
print('Saving')
hosts_manager.commit()

print('BeGoneAds uninstalled')
print('BeGoneAds uninstalled')


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def readme():

setup(
name='begoneads',
version='0.0.7',
version='0.0.8',
description='BeGoneAds puts some popular hosts file lists into the hosts file as a adblocker measure.',
python_requires='>=3.6',
long_description=readme(),
Expand Down

0 comments on commit 4204193

Please sign in to comment.