mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-03 17:06:36 +00:00 
			
		
		
		
	Handle no read perms on checksum file
This commit is contained in:
		
							parent
							
								
									cc85ab1e78
								
							
						
					
					
						commit
						1c9cc30ff3
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -75,6 +75,12 @@ def _get_checksum_dict(file):
 | 
			
		|||
        with open(file, 'w') as f:
 | 
			
		||||
            json.dump(checksums, f)
 | 
			
		||||
        return checksums
 | 
			
		||||
    except PermissionError:
 | 
			
		||||
        print(
 | 
			
		||||
            f'{colorama.Fore.RED}PermissionError: {colorama.Fore.RESET}'
 | 
			
		||||
            'to run tamper-check you must have read access to checksum file: '
 | 
			
		||||
            f"'{colorama.Fore.BLUE}{file}{colorama.Fore.RESET}' (forgot sudo?)"
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue