Refuse any url with a scheme or path

This commit is contained in:
Eshan Singh
2018-01-05 10:46:36 +00:00
parent 04c25ca644
commit 7d154a3cfe
3 changed files with 18 additions and 7 deletions

View File

@@ -22,7 +22,14 @@ def main():
# set user agent
musicbrainzngs.set_useragent("whipper", whipper.__version__,
"https://github.com/JoeLametta/whipper")
musicbrainzngs.set_hostname(config.Config().get_musicbrainz_server())
try:
server = config.Config().get_musicbrainz_server()
except KeyError, e:
sys.stderr.write('whipper: %s\n' % e.message)
sys.exit()
musicbrainzngs.set_hostname(server)
# register plugins with pkg_resources
distributions, _ = pkg_resources.working_set.find_plugins(
pkg_resources.Environment([directory.data_path('plugins')])