ifwe / python-hipchat

Do What The F*ck You Want To Public License
46 stars 8 forks source link

hipchat.config.config_init_cfg exception #5

Closed cwells closed 10 years ago

cwells commented 10 years ago
Python 2.7.5 (default, Nov 12 2013, 16:45:54) 
[GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hipchat.config
>>> hipchat.config.init_cfg('hipchat.cfg')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/hipchat/config.py", line 10, in init_cfg
  File "/usr/lib/python2.7/site-packages/configobj.py", line 567, in __getitem__
    val = dict.__getitem__(self, key)
KeyError: 'token'
>>> 

Do I need to create 'hipchat.cfg' first? If so, what do I put into it?

mikedougherty commented 10 years ago

I believe the example in the README is up-to-date:

In [18]: cat 'hipchat.cfg'
token = fa28d24b4ee537f0ffa51d545a9bf7
proxy_server = proxy.example.org
proxy_type = http

If you have no requirement for a proxy server, a token variable should be sufficient.

cwells commented 10 years ago

Thanks!