~vomun-developers/anonplus/vomun-trunk

« back to all changes in this revision

Viewing changes to src/libs/storage/manager.py

  • Committer: AJ00200
  • Date: 2011-11-26 01:57:56 UTC
  • Revision ID: git-v1:9d0494d57d5f3d546fb3a6ba4607e5eb41cd9e7b
Made some changes with events. We now have a logit event.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        db_file.write(json.dumps(out_json, indent = 2))
50
50
        db_file.close()
51
51
 
 
52
        libs.events.broadcast('logthis', 'Saved the data store.')
 
53
 
52
54
    def load(self, path):
53
55
        '''Load the database to a storage file.'''
54
56
        db_file = open(path, 'r')
79
81
    '''Create the storage database.'''
80
82
    database = StorageDB()
81
83
    database.path = libs.config['vomundir'] + 'blocks.json'
82
 
    print('Path is: ' + database.path)
83
84
    libs.events.register_handler(database)