mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 09:16:36 +00:00 
			
		
		
		
	Use indent of 4 to ensure json file readability
This commit is contained in:
		
							parent
							
								
									572c405efb
								
							
						
					
					
						commit
						e250df05de
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -73,7 +73,7 @@ def _get_checksum_dict(file):
 | 
			
		|||
        os.makedirs(os.path.dirname(file), exist_ok=True)
 | 
			
		||||
        checksums = {}
 | 
			
		||||
        with open(file, 'w') as f:
 | 
			
		||||
            json.dump(checksums, f)
 | 
			
		||||
            json.dump(checksums, f, indent=4)
 | 
			
		||||
        return checksums
 | 
			
		||||
    except PermissionError:
 | 
			
		||||
        print(
 | 
			
		||||
| 
						 | 
				
			
			@ -99,7 +99,7 @@ def _add_file(file_path, checksum, checksum_file, update_only=False):
 | 
			
		|||
    checksums[file_path] = checksum
 | 
			
		||||
    try:
 | 
			
		||||
        with open(checksum_file, 'w') as f:
 | 
			
		||||
            json.dump(checksums, f)
 | 
			
		||||
            json.dump(checksums, f, indent=4)
 | 
			
		||||
    except PermissionError:
 | 
			
		||||
        print(
 | 
			
		||||
            f'{colorama.Fore.RED}PermissionError: {colorama.Fore.RESET}'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue