Catch FileNotFoundError
This commit is contained in:
		
							parent
							
								
									99d4919539
								
							
						
					
					
						commit
						8de3064953
					
				
					 4 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -154,8 +154,8 @@ def bluetooth_audio_sink():
 | 
			
		|||
    try:
 | 
			
		||||
        output = subprocess.check_output("pamixer --list-sinks".split()).decode("utf-8")
 | 
			
		||||
        output = [x for x in output.split('\n') if "blue" in x.lower()]
 | 
			
		||||
    except subprocess.CalledProcessError:
 | 
			
		||||
        return -1
 | 
			
		||||
    except subprocess.CalledProcessError, FileNotFoundError:
 | 
			
		||||
 | 
			
		||||
    sink = -1
 | 
			
		||||
    try:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue