Browse Source

Verify the token is not anything empty, not just "not an empty string"

If you pass an empty list, tuple, False, 0, whatever.. it will assume th
token is valid, which it isn't.
opensearch
nir0s 7 years ago
parent
commit
be328d3b26
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      logzio/handler.py

+ 1
- 1
logzio/handler.py View File

@ -18,7 +18,7 @@ class LogzioHandler(logging.Handler):
url="https://listener.logz.io:8071", url="https://listener.logz.io:8071",
debug=False): debug=False):
if token is "":
if not token:
raise LogzioException("Logz.io Token must be provided") raise LogzioException("Logz.io Token must be provided")
self.logzio_type = logzio_type self.logzio_type = logzio_type


Loading…
Cancel
Save