comodit / synapse-agent

Synapse enables you to remotely manage a large number of hosts. It brings together features of Configuration Management and Orchestration in a lightweight framework. Written in Python and using AMQP for messaging between the nodes.
http://comodit.github.com/synapse-agent
Other
81 stars 11 forks source link

Config import error synapse-client on Debian #2

Closed Shaps closed 11 years ago

Shaps commented 11 years ago

After installing synapse-client on a fresh install Debian Squeezy 6.0, I was getting this error when testing on localhost:

Traceback (most recent call last):
  File "/usr/bin/synapse-client", line 5, in <module>
    from syncli import main
  File "/usr/lib/pymodules/python2.6/syncli/main.py", line 4, in <module>
    from syncli.config import get_config_path
  File "/usr/lib/pymodules/python2.6/syncli/config.py", line 45, in <module>
    config.read(get_config_path('synapse-client.conf'))
  File "/usr/lib/python2.6/ConfigParser.py", line 281, in read
    for filename in filenames:
TypeError: 'NoneType' object is not iterable

Fixed:

In this file

/usr/lib/pymodules/python2.6/syncli/config.py

synapse-client searches for the config file, in the "/etc/synapse" directory, exactely on line 33:

    etc_path = join("/etc/synapse", filename)

which is wrong. The correct path on Debian is "/etc/synapse-client", so updating the line with

        etc_path = join("/etc/synapse-client", filename)

It works fine.

-Shaps