Esempio n. 1
0
 def save():
     with open(type_, 'wb') as fl:
         Pickle.dump(data, fl)
     log.info(msg)
     print >>sys.stderr, msg
Esempio n. 2
0
 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
Esempio n. 3
0
 def change_username(self, username):
     log.info("Changing username...")
     self.data["security"]["user"], self.password = username
     self.write()
     return True
Esempio n. 4
0
 def write(self):
     with closing(open("bin/config.conf", "wb")) as fl:
         Pickle.dump(self.data, fl)
     log.info("Configuration file successfully updated")