Skip to content

Commit f65c042

Browse files
committed
Merge pull request #34 from arxanas/raw-input
Fix Python 2-only raw_input call
2 parents 12bb2e0 + f880a00 commit f65c042

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

piazza_api/rpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33

44
import requests
5+
import six.moves
56

67
from piazza_api.exceptions import AuthenticationError, NotAuthenticatedError, \
78
RequestError
@@ -38,7 +39,7 @@ def user_login(self, email=None, password=None):
3839
:type password: str
3940
:param password: The password used for authentication
4041
"""
41-
email = raw_input("Email: ") if email is None else email
42+
email = six.moves.input("Email: ") if email is None else email
4243
password = getpass.getpass() if password is None else password
4344

4445
login_data = {

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
requests
2+
six==1.10.0

0 commit comments

Comments
 (0)