Commit graph

32 commits

Author SHA1 Message Date
Luflosi d4dcc75711
Avoid "DeprecationWarning: invalid escape sequence"
Without this change, many warnings like this will be generated while running pytest:
```
test/test_template.py:3
  /build/source/test/test_template.py:3: DeprecationWarning: invalid escape sequence '\/'
    """!
```
This can also be seen when manually running python with warnings enabled.

This happens because the comment uses a multiline string and Python interprets the backslash in the logo as an escape character and complains that \/ is not a valid escape sequence. To fix this, prepend the string with the letter r to indicate that the backslash should be treated as a literal character, see https://docs.python.org/3/reference/lexical_analysis.html#index-20.
I also applied this change to all the comment strings since that shouldn't break anything and to establish it as a pattern for the future so this problem hopefully never happens again.

This is what I did specifically:
- Change the comment at the top of bw_client.py and bw_server.py to start with `"""!` since that seems to be the pattern here
- Search-and-Replace all occurances of `"""!` with `r"""!`
- Manually change the strings in `logoToLog()` in boswatch/utils/header.py
2023-09-19 17:49:09 +02:00
Bastian Schroll e8c0446943
edit docs 2019-10-26 16:23:42 +02:00
Bastian Schroll bb1a7f21f9
fix server/client encoding 2019-10-24 18:46:22 +02:00
Bastian Schroll 72f4f3c8d8 fix false socket.shutdown call 2019-10-24 10:55:25 +02:00
Bastian Schroll 60d05dc235 fix some log messages 2019-10-24 10:08:07 +02:00
Bastian Schroll 464c0c2298
fix server/client connection 2019-10-23 19:05:09 +02:00
Bastian Schroll 549fbafc29
fix client.isConnected() 2019-10-23 15:26:35 +02:00
Bastian Schroll 504728191d add recv timeout for client 2019-10-23 14:17:12 +02:00
Bastian Schroll 50095bf4a7 fix errors 2019-10-23 09:19:32 +02:00
Bastian Schroll 3cd5a59bb5 improve client isConnected method 2019-10-23 08:59:19 +02:00
Bastian Schroll f88c3ea03f improve logging 2019-10-23 08:10:50 +02:00
Bastian Schroll 06549b8e26 some improvements 2019-10-20 19:07:16 +02:00
Bastian Schroll 056e7857e5 simplify server/client exception handling 2019-10-20 18:55:02 +02:00
Bastian Schroll ae36cf8045 changes in client 2019-10-20 17:56:40 +02:00
Bastian Schroll 0445dc38cc fix test_serverStopsWhileConnected 2019-10-20 17:37:37 +02:00
Bastian Schroll 6f364b8e6a fix server client issues
- add test for server stops until clients connected
- add header for data packets
- check header on read and read only data size in
- make readings non blocking
2019-10-20 17:21:03 +02:00
Bastian Schroll d87247783d fix in TCPClient 2019-09-20 18:19:46 +02:00
Bastian Schroll c76c179225 various pylint fixes 2019-03-03 19:39:53 +01:00
Bastian Schroll 39d88f3e3d implement new router system in server 2019-03-02 09:17:20 +01:00
Bastian Schroll 3fa10911c9 remove generall exception handling 2019-03-02 09:15:40 +01:00
Bastian Schroll 9371b71ee0 add isRunning/isConnected Props to server and client 2019-02-28 08:57:41 +01:00
Bastian Schroll 1837ba46af
Merge branch 'develop' into ping 2018-09-21 22:09:30 +02:00
Bastian Schroll 11eab418ed improve exc handling and tests 2018-09-21 14:21:33 +02:00
Bastian Schroll 5c6039ef71 rework server class (added python queue support) 2018-09-20 23:35:56 +02:00
Bastian Schroll 3f1eac88be fixes for pyLint 2018-09-18 05:59:38 +02:00
Bastian Schroll a1e8393627 little changes + tests 2018-02-22 07:34:42 +01:00
Bastian Schroll 34ed9c3d5b edit server and client class
- server: bind not only to local - bind to all
- client improve error handling
2018-01-13 13:22:28 +01:00
Bastian Schroll f0d19eaba0 some little changes 2018-01-13 09:56:46 +01:00
Bastian Schroll d08e11e17e add timeout msg to client 2018-01-12 09:02:07 +01:00
Bastian Schroll 6e011301d4 fix some typos and other 2018-01-11 13:01:27 +01:00
Bastian Schroll 1f6c2cba3e edit descriptor test 2018-01-07 22:34:40 +01:00
Bastian Schroll 73c0541629 add server/client class 2018-01-07 21:50:41 +01:00