mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Use os.getlogin() instead of whoami command for getting username
This commit is contained in:
		
							parent
							
								
									a8b3feac86
								
							
						
					
					
						commit
						7b157b045a
					
				| 
						 | 
				
			
			@ -149,7 +149,7 @@ def grabclipboard():
 | 
			
		|||
            loginctl = None
 | 
			
		||||
 | 
			
		||||
        if loginctl is not None:
 | 
			
		||||
            username = subprocess.check_output("whoami").decode().strip("\n")
 | 
			
		||||
            username = os.getlogin()
 | 
			
		||||
            sessionid = [
 | 
			
		||||
                line.split()[0] for line in loginctl if username in line.split()
 | 
			
		||||
            ][0]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user