def createProfile(self,username,password): if self.state == self.STATE_LOGGEDOUT: profile = Profile(username,password) profile.create() self.state = self.STATE_LOGGEDIN self.activeProfile = profile
def doLoginTry(self,username,password): if self.state == self.STATE_LOGGEDOUT: profile = Profile(username,password) profile.load() self.state = self.STATE_LOGGEDIN self.activeProfile = profile