architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 221 forks source link

Missing ECH definitions #105

Closed tonjo closed 7 years ago

tonjo commented 7 years ago

ECH competition is not show in main.py and it's not configured in leagueproperties.py

soccer --league ECH --standings
POS    CLUB                              PLAYED        GOAL DIFF     POINTS
Traceback (most recent call last):
 File "/usr/local/bin/soccer", line 9, in <module>
    load_entry_point('soccer-cli==0.1.0.0', 'console_scripts', 'soccer')()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
     return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
     rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
     return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
     return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/soccer_cli-0.1.0.0-py2.7.egg/soccer/main.py", line 296, in main
    get_standings(league, writer)
  File "/usr/local/lib/python2.7/dist-packages/soccer_cli-0.1.0.0-py2.7.egg/soccer/main.py", line 138, in get_standings
     writer.standings(req.json(), league)
   File "/usr/local/lib/python2.7/dist-packages/soccer_cli-0.1.0.0-py2.7.egg/soccer/writers.py", line 132, in standings
    cl_upper, cl_lower = LEAGUE_PROPERTIES[league]['cl']
KeyError: 'ECH'
dfrt82 commented 7 years ago

Thanks for your feedback. I updated the league and leagueproperties files. should be all set now.