I have got my code to work, but I've come across something I don't 
understand.

In my bash script that starts it all I copy a local owfs.conf file to 
/etc/owfs.conf, then restart owserver, then start my python code, so 
basically I have

cp owfs.conf /etc/
systemctl restart owserver.service
./control.py >> logfile

That fails with a message that ends
File "/usr/local/lib/python2.7/dist-packages/pyownet/protocol.py", line 
729, in proxy
     raise ConnError(*lasterr)
pyownet.protocol.ConnError: [Errno 111] Connection refused

If I have removed the restart it still fails, however if I introduce a 
delay it works

cp owfs.conf /etc/
sleep 5
./control.py >> logfile

Less than 5 seconds it fails, 5 or more it works

I have tried copying some file other than owfs.conf, that works OK, so 
it seems to be copying to /etc/owfs.conf that causes my problem and I 
need to be sure that it has completed before I start my code.

I can put a delay in there but does not seem to be the right way to do 
it, any suggestions?

Thanks
Mick

------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to