Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf9b316

Browse files
committed
Comment the example code
A bit of clarification
1 parent7121b26 commitaf9b316

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-
Thenif 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+
Theneach 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)

[8]ページ先頭

©2009-2025 Movatter.jp