Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

Commit

Permalink
Made password to be entered by the user without echoing back in the s…
Browse files Browse the repository at this point in the history
…creen.
  • Loading branch information
psibi committed Jan 6, 2013
1 parent 828ff94 commit 1ad32d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mwuppet.py
Expand Up @@ -4,6 +4,7 @@
from mwapi import MWApi
from yaml import load, dump
import re
import getpass

MODE_REGEX = re.compile(r'page:\s?(\S*)', re.I)

Expand All @@ -24,7 +25,7 @@ def ensure_logged_in():

# If it reaches here, that means we don't have a valid login
username = raw_input("Enter your username: ")
password = raw_input("Enter your password: ")
password = getpass.getpass("Enter your password: ")
api.login(username, password)

cookies = api.get_auth_cookie()
Expand Down

0 comments on commit 1ad32d9

Please sign in to comment.