def load(self):
try:<EOL><INDENT>if os.path.getsize(self.state_file) <= <NUM_LIT:1>:<EOL><INDENT>raise IOError("<STR_LIT>")<EOL><DEDENT>with open(self.state_file) as fh:<EOL><INDENT>state = json.load(fh)<EOL>assert isinstance(state, dict)<EOL>self.hosts = state['<STR_LIT>']<EOL>self.stats = state['<STR_LIT>']<EOL><DEDENT>for key in self.stats:<EOL><INDENT>self.stats[key]['<STR_LIT>'] = <NUM_LIT:0><EOL><DEDENT><DEDENT>except (IOError, OSError):<EOL><INDENT>self.hosts = {}<EOL>self.stats = {}<EOL><DEDENT>
Loads the state from the state file