Commit graph

37 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 bb1a7f21f9
fix server/client encoding 2019-10-24 18:46:22 +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 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 5f30bcb2f3 fix server test 2019-10-21 12:24:25 +02:00
Bastian Schroll 1ae54bee27 fix server test 2019-10-21 11:53:12 +02:00
Bastian Schroll 422109f3fe test changes 2019-10-21 11:22:53 +02:00
Bastian Schroll 0e587e7698 fix server test 2019-10-21 10:11:54 +02:00
Bastian Schroll 056e7857e5 simplify server/client exception handling 2019-10-20 18:55:02 +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 43674989b9 little change in server test 2019-03-03 20:14:46 +01:00
Bastian Schroll c76c179225 various pylint fixes 2019-03-03 19:39:53 +01:00
Bastian Schroll e372fb75b4 fix some classes for testing 2019-03-03 09:56:36 +01:00
Bastian Schroll 3fa10911c9 remove generall exception handling 2019-03-02 09:15:40 +01:00
Bastian Schroll f487bfc104 some refactoring 2019-03-01 22:12:29 +01:00
Bastian Schroll 9371b71ee0 add isRunning/isConnected Props to server and client 2019-02-28 08:57:41 +01:00
Bastian Schroll 9a3c28744b fix a error in server 2018-09-21 16:37:23 +02:00
Bastian Schroll 24083ad6e8 little improvements 2018-09-21 16:05:48 +02:00
Bastian Schroll c2b3093bb5
Merge branch 'develop' into server_queue 2018-09-21 12:53:06 +02:00
Bastian Schroll 5c6039ef71 rework server class (added python queue support) 2018-09-20 23:35:56 +02:00
Bastian Schroll 1252a953a8 add doc to server.py 2018-09-20 07:58:26 +02:00
Bastian Schroll 3f1eac88be fixes for pyLint 2018-09-18 05:59:38 +02:00
Bastian Schroll e97b97640b little changes in server 2018-09-09 16:16:55 +02:00
Bastian Schroll fd501c23dc some little improvements 2018-02-03 22:32:28 +01:00
Bastian Schroll c89e6ef28c add intern list of all connected clients in server 2018-02-02 23:43:05 +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 03e2f6091e add a countPacketsInQueue() method to server 2018-01-12 18:58:14 +01:00
Bastian Schroll 4cd7dd183a edit server and plugin 2018-01-12 12:33:41 +01:00
Bastian Schroll 7662f05f0c do lock with the with statement 2018-01-12 09:50:46 +01:00
Bastian Schroll 4dad6bc414 edit lock mechanism 2018-01-12 09:14:22 +01:00
Bastian Schroll a955058edd insert lock-methods into server 2018-01-12 09:02:26 +01:00
Bastian Schroll e108720998 edit server.py 2018-01-08 15:50:13 +01:00
Bastian Schroll f6094618d8 some edits 2018-01-08 08:09:23 +01:00
Bastian Schroll 73c0541629 add server/client class 2018-01-07 21:50:41 +01:00