mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 01:47:27 +03:00 
			
		
		
		
	Fix interactive login would prompt 2fa forever
This commit is contained in:
		
							parent
							
								
									fa693d068a
								
							
						
					
					
						commit
						72e6229cc7
					
				| 
						 | 
					@ -187,6 +187,7 @@ async def interactive_login(
 | 
				
			||||||
                password = getpass.getpass(": ")
 | 
					                password = getpass.getpass(": ")
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    user = await self.check_password(user_or_token, password)
 | 
					                    user = await self.check_password(user_or_token, password)
 | 
				
			||||||
 | 
					                    break
 | 
				
			||||||
                except RpcError as e:
 | 
					                except RpcError as e:
 | 
				
			||||||
                    if e.name.startswith("PASSWORD"):
 | 
					                    if e.name.startswith("PASSWORD"):
 | 
				
			||||||
                        print("Invalid password:", e)
 | 
					                        print("Invalid password:", e)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user