Commit Graph

7 Commits

Author SHA1 Message Date
Tony Murray
304ebc08ad Revert "Python log mysql connection errors and harden config retrieval (#12058)" (#12347)
This reverts commit c149ce0b3a.
2020-11-24 07:26:42 -06:00
Orsiris de Jong
c149ce0b3a Python log mysql connection errors and harden config retrieval (#12058)
* Make usage of logger, also harden exception logging

* Make usage of hardened command_runner

This is a hardened version of subprocess.call which handles timeout, encoding and various errors that may happen during execution

* Remove unused exception logging

* Fix bogus exception logging

* Rename exception to match log line

* Make command_runner pylint friendly under Unix

* Add copyrights to my parts of code
2020-11-23 00:35:49 -06:00
Tony Murray
ed5bc6c871 Fix some connection issues (#11693)
When mysqld is configured to listen on a non localhost port, pymysql.install_as_MySQLdb() has inconsistent behavior.
Try to import MySQLdb first which has the correct behavior.
2020-05-25 20:01:11 -05:00
Tony Murray
0b68c70a97 Python wrapper sql cleanup (#11628)
* Clean up wrapp mysql connect a bit

* fix typo
2020-05-19 10:14:09 -05:00
Tony Murray
b90549b316 python wrapper Decode config data output (#11620)
* decode config_data output

* decode config_data output
2020-05-15 10:43:00 -05:00
Tony Murray
ec3dc4f89b Don't use command_runner (#11618) 2020-05-15 08:29:30 -05:00
Orsiris de Jong
1dd0d46edd Migrate Python scripts to Python 3 (#10759)
* Migrate to python3

* Migrate to python3

* Migrate to python3

* Migrate to python3

* Code refactoring and python 2 compat

* Code refactoring and python 2 compat

* Code refactoring and python 2 compat

* Code refactoring and python 2 compat

* Added shared code for wrappers

* Fix python version check

* Allow pure python MySQL library

* move library.py
remove python2 support bits
remove duplicate code

* fix log location

* whitespace?

* fix pre-existing bug

* fix bug when no devices/services exist

* fix pylint issues

* update imports to match

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-15 00:37:34 -05:00