8000 Comment the example code · danpalmer/github3.py@af9b316 · GitHub
[go: up one dir, main page]

Skip to content

Commit af9b316

Browse files
committed
Comment the example code
A bit of clarification
1 parent 7121b26 commit af9b316

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/examples/two_factor_auth.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ For example:
2525
def my_two_factor_function():
2626
code = ''
2727
while not code:
28+
# The user could accidentally press Enter before being ready,
29+
# let's protect them from doing that.
2830
code = prompt('Enter 2FA code: ')
2931
return code
3032
3133
g = github3.login('sigmavirus24', 'my_password',
3234
two_factor_callback=my_two_factor_function)
3335
34-
Then if the API tells github3.py it requires a Two Factor Authentication code,
35-
github3.py will call ``my_two_factor_function`` and prompt you for it.
36+
Then each the API tells github3.py it requires a Two Factor Authentication
37+
code, github3.py will call ``my_two_factor_function`` which prompt you for it.

0 commit comments

Comments
 (0)
0