Commits

Jason R. Coombs committed 6cb55d3

spaces, man - indent with spaces!

  • Participants
  • Parent commits 470d417

Comments (0)

Files changed (1)

 urllib2.HTTPBasicAuthHandler.
 
 usage:
-	import urllib2
-	handlers = [urllib2.HTTPBasicAuthHandler(PasswordMgr())]
-	urllib2.install_opener(handlers)
-	urllib2.urlopen(...)
-	
+    import urllib2
+    handlers = [urllib2.HTTPBasicAuthHandler(PasswordMgr())]
+    urllib2.install_opener(handlers)
+    urllib2.urlopen(...)
+    
 This will prompt for a password if one is required and isn't already
 in the keyring. Then, it adds it to the keyring for subsequent use.
 """
 import getpass
 
 class PasswordMgr(object):
-	def get_username(self, realm, authuri):
-		return getpass.getuser()
+    def get_username(self, realm, authuri):
+        return getpass.getuser()
 
-	def find_user_password(self, realm, authuri):
-		user = self.get_username(realm, authuri)
-		passwd = keyring.get_password(authuri, user)
-		if passwd is None:
-			prompt = 'password for %(user)s@%(realm)s for '\
-				'%(authuri)s: ' % vars()
-			passwd = getpass.getpass(prompt)
-			keyring.set_password(authuri, user, passwd)
-		return user, passwd
+    def find_user_password(self, realm, authuri):
+        user = self.get_username(realm, authuri)
+        passwd = keyring.get_password(authuri, user)
+        if passwd is None:
+            prompt = 'password for %(user)s@%(realm)s for '\
+                '%(authuri)s: ' % vars()
+            passwd = getpass.getpass(prompt)
+            keyring.set_password(authuri, user, passwd)
+        return user, passwd