"11" : N_("Signal processing controller"),
"ff" : N_("Unassigned class"),
},
"11" : N_("Signal processing controller"),
"ff" : N_("Unassigned class"),
},
- def updated(self, profile_parser=None, location=None, when=None):
+ def updated(self, profile_parser=None, country_code=None, when=None):
valid = self.settings.get_int("fireinfo_profile_days_valid", 14)
self.db.execute("UPDATE fireinfo_profiles \
valid = self.settings.get_int("fireinfo_profile_days_valid", 14)
self.db.execute("UPDATE fireinfo_profiles \
if not hasattr(self, "_location"):
res = self.db.get("SELECT location FROM fireinfo_profiles_locations \
WHERE profile_id = %s", self.id)
if not hasattr(self, "_location"):
res = self.db.get("SELECT location FROM fireinfo_profiles_locations \
WHERE profile_id = %s", self.id)
- def set_location(self, location):
- if self.location == location:
+ def set_country_code(self, country_code):
+ if self.location == country_code:
return
self.db.execute("DELETE FROM fireinfo_profiles_locations \
WHERE profile_id = %s", self.id)
self.db.execute("INSERT INTO fireinfo_profiles_locations(profile_id, location) \
return
self.db.execute("DELETE FROM fireinfo_profiles_locations \
WHERE profile_id = %s", self.id)
self.db.execute("INSERT INTO fireinfo_profiles_locations(profile_id, location) \
- VALUES(%s, %s)", self.id, location)
+ VALUES(%s, %s)", self.id, country_code)
def set_kernel_id(self, kernel_id):
if self.kernel_id == kernel_id:
return
def set_kernel_id(self, kernel_id):
if self.kernel_id == kernel_id:
return
- def _handle_profile(self, public_id, profile_blob, location=None, when=None):
+ def _handle_profile(self, public_id, profile_blob, country_code=None, when=None):
if profile:
# Check if the profile has changed. If so, update the data.
if profile_parser.equals(profile):
if profile:
# Check if the profile has changed. If so, update the data.
if profile_parser.equals(profile):
profile = self.fireinfo.create_profile(public_id, private_id, when=when)
profile.parse(profile_parser)
profile = self.fireinfo.create_profile(public_id, private_id, when=when)
profile.parse(profile_parser)