Remove return value from load_config, so no illusion of purity.
This method already relies on object state anyway and writes back to self.config, so the return value is unnecessary.
This commit is contained in:
		
							parent
							
								
									9eb9220ca9
								
							
						
					
					
						commit
						3b3c690ae3
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		|  | @ -1313,7 +1313,7 @@ class PhotoDB( | |||
| 
 | ||||
|         # CONFIG | ||||
|         self.config_filepath = self.data_directory.with_child(constants.DEFAULT_CONFIGNAME) | ||||
|         self.config = self.load_config() | ||||
|         self.load_config() | ||||
|         self.log.setLevel(self.config['log_level']) | ||||
| 
 | ||||
|         # OTHER | ||||
|  | @ -1542,8 +1542,6 @@ class PhotoDB( | |||
|         if needs_dump: | ||||
|             self.save_config() | ||||
| 
 | ||||
|         return config | ||||
| 
 | ||||
|     def save_config(self): | ||||
|         with open(self.config_filepath.absolute_path, 'w', encoding='utf-8') as handle: | ||||
|             handle.write(json.dumps(self.config, indent=4, sort_keys=True)) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue