Beispiel #1
0
 def do_update(self, s):
     """Updates location or system."""
     if "location" in s:
         location = MEMORY.get_data('city')
         loc_str = str(location)
         print_say("Your current location is set to " + loc_str, self)
         print_say("What is your new location?", self)
         i = input()
         MEMORY.update_data('city', i)
         MEMORY.save()
     elif "system" in s:
         update_system()
Beispiel #2
0
def do_update(self, s):
    """
    location: Updates location.
    system: Updates system.
    """
    self = self_jarvis

    if "location" in s:
        location = self.memory.get_data('city')
        loc_str = str(location)
        print_say("Your current location is set to " + loc_str, self)
        print_say("What is your new location?", self)
        i = input()
        self.memory.update_data('city', i)
        self.memory.save()
    elif "system" in s:
        update_system()