Skip to content

Commit

Permalink
Fix Config.is_ssl property return type
Browse files Browse the repository at this point in the history
  • Loading branch information
cknv committed Aug 27, 2019
1 parent e5125bf commit e09a11c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ def test_ssl_config(certfile_and_keyfile):
config = Config(app=asgi_app, ssl_certfile=certfile.name, ssl_keyfile=keyfile.name)
config.load()

assert bool(config.is_ssl) is True
assert config.is_ssl is True
2 changes: 1 addition & 1 deletion uvicorn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def __init__(

@property
def is_ssl(self) -> bool:
return self.ssl_keyfile or self.ssl_certfile
return bool(self.ssl_keyfile or self.ssl_certfile)

def load(self):
assert not self.loaded
Expand Down

0 comments on commit e09a11c

Please sign in to comment.