diff options
author | Murilo Opsfelder Araujo <mopsfelder@gmail.com> | 2015-09-21 22:11:00 -0300 |
---|---|---|
committer | Murilo Opsfelder Araujo <mopsfelder@gmail.com> | 2015-09-21 22:11:00 -0300 |
commit | c70ae2feae917f4722f3eb5f7b5ad9a8a850833d (patch) | |
tree | b00879533fb7b9f8b8074e1906ac1614757584a0 | |
parent | f0048f8d03be4d73a3d4ac6384795c92e9e1cc1e (diff) | |
download | cherrypy-c70ae2feae917f4722f3eb5f7b5ad9a8a850833d.tar.gz |
docs/basics.rst: Update validate_password() to take 3 arguments
This change updates the sample validate_password() function since it
actually receives 3 arguments when called, i.e. realm, username and
password.
Without this change, the following exception is raised:
TypeError: validate_password() takes exactly 2 arguments (3 given)
-rw-r--r-- | docs/basics.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/basics.rst b/docs/basics.rst index 4b6ebd54..b1896f22 100644 --- a/docs/basics.rst +++ b/docs/basics.rst @@ -759,7 +759,7 @@ SSL or within a closed network. USERS = {'jon': 'secret'} - def validate_password(username, password): + def validate_password(realm, username, password): if username in USERS and USERS[username] == password: return True return False |