nopenpilot/common
Shubham Dhumal 236743a4e2
Fix jwt.encode return type (#19776) (#19958)
* Fix for issue #19776

PyJWT 2.0.0 does not return `bytes` for `encode()` instead returns `str`. So converted the `str` to `bytes` and returned the resulting value

* added check for jwt.encode return type

* Update __init__.py

* Updated with suggested change

* Test to check return type of get_token() 

The `get_token()` must return a `str` but for PyJWT version < 2.0.0 the `jwt.encode()` returns `bytes`. This test is to make sure if token returned by `get_token()` is `str`.

* Update test_get_token.py

* Update test_get_token.py

* Delete test_get_token.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-02-02 15:36:04 +01:00
..
api Fix jwt.encode return type (#19776) (#19958) 2021-02-02 15:36:04 +01:00
kalman Scons builder for cython extensions (#2485) 2020-11-11 21:14:51 +01:00
tests Simple improvements for quality gate (#2517) 2020-11-12 14:48:45 -08:00
transformations lgtm fixes (#19610) 2020-12-28 20:36:23 -08:00
.gitignore common folder 2020-01-17 10:28:44 -08:00
__init__.py common folder 2020-01-17 10:28:44 -08:00
basedir.py Qt Offroad stats (#19498) 2020-12-18 13:29:20 +01:00
clock.pyx Scons builder for cython extensions (#2485) 2020-11-11 21:14:51 +01:00
cython_hacks.py common folder 2020-01-17 10:28:44 -08:00
ffi_wrapper.py --std=c++17 (#2330) 2020-10-17 13:33:12 -07:00
file_helpers.py mkdirs_exists_ok more specific URL detection 2020-06-09 08:56:16 -07:00
filter_simple.py add low pass filter on cpu temp (#1305) 2020-04-01 15:58:40 -07:00
gpio.py HW abstraction layer (#19530) 2020-12-16 21:30:23 -08:00
lazy_property.py common folder 2020-01-17 10:28:44 -08:00
logging_extra.py remove duplicate logging context 2020-07-03 16:18:29 -07:00
numpy_fast.py Enable more flake8 checks (#1602) 2020-05-30 20:14:58 -07:00
numpy_helpers.py Mpc rework2 (#19660) 2021-01-14 18:43:50 -08:00
params.py params helpers (#19788) 2021-01-19 14:39:00 -08:00
params_pxd.pxd merge utilpp.h into util.h (#19710) 2021-01-10 14:57:32 -08:00
params_pyx.pyx vision-only radar toggle (#19849) 2021-01-27 14:15:59 +01:00
profiler.py improve profiler 2020-10-09 18:39:54 -07:00
realtime.py HW abstraction layer (#19530) 2020-12-16 21:30:23 -08:00
SConscript Scons builder for cython extensions (#2485) 2020-11-11 21:14:51 +01:00
spinner.py fix startup spinner for non-C2 (#19536) 2020-12-18 14:47:25 -08:00
stat_live.py Flake8 E22X (#1607) 2020-05-31 00:48:47 -07:00
string_helpers.py Enable more flake8 checks (#1602) 2020-05-30 20:14:58 -07:00
text_window.py Qt spinner (#2494) 2020-11-06 18:44:04 -08:00
timeout.py Enable more flake8 checks (#1602) 2020-05-30 20:14:58 -07:00
window.py support for halve in Window 2020-10-20 16:07:05 -07:00
xattr.py uploader: do not delete files after uploading (#1253) 2020-03-19 18:09:26 -07:00