shinken-monitoring / pack-windows

Shinken configuration pack for Windows hosts
3 stars 6 forks source link

Wrong encoding #12

Open firesalp opened 6 years ago

firesalp commented 6 years ago

Hello,

I have some issues with special chars in the windows share name with autodiscover. Here is the output log:

Traceback (most recent call last):
  File "/usr/bin/shinken-discovery", line 175, in <module>
    d.write_config()
  File "/usr/local/lib/python2.7/dist-packages/shinken/discovery/discoverymanager.py", line 634, in write_config
    self.write_host_config(name)
  File "/usr/local/lib/python2.7/dist-packages/shinken/discovery/discoverymanager.py", line 649, in write_host_config
    self.write_host_config_to_file(final_host, d)
  File "/usr/local/lib/python2.7/dist-packages/shinken/discovery/discoverymanager.py", line 675, in write_host_config_to_file
    buf = self.get_cfg_bufer(d, 'host')
  File "/usr/local/lib/python2.7/dist-packages/shinken/discovery/discoverymanager.py", line 747, in get_cfg_bufer
    return '\n'.join(tab)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 77: ordinal not in range(128)

My locales are all set like this

export LANGUAGE=fr_FR.UTF-8
export LANG=fr_FR.UTF-8
export LC_ALL=fr_FR.UTF-8

Did I missed somethine?