def save(): with open(type_, 'wb') as fl: Pickle.dump(data, fl) log.info(msg) print >>sys.stderr, msg
def change_password(self, password): log.info("Changing password...") password = self.create_signature(password) self.data["security"]["password"] = self.password = password self.write() return True
def change_username(self, username): log.info("Changing username...") self.data["security"]["user"], self.password = username self.write() return True
def write(self): with closing(open("bin/config.conf", "wb")) as fl: Pickle.dump(self.data, fl) log.info("Configuration file successfully updated")