Пример #1
0
 def _ask_for_tos_acceptance_if_needed(self):
     accepted_tos = self.config.user_accepted_tos
     if not accepted_tos:
         # show the dialog and ensure the user accepts it
         res = show_accept_tos_dialog(get_parent(self))
         if not res:
             return False
         self.config.user_accepted_tos = True
         return True
     return True
Пример #2
0
 def _ask_for_tos_acceptance_if_needed(self):
     accepted_tos = self.config.user_accepted_tos
     if not accepted_tos:
         # show the dialog and ensure the user accepts it
         res = show_accept_tos_dialog(get_parent(self))
         if not res:
             return False
         self.config.user_accepted_tos = True
         return True
     return True
 def _ask_for_tos_acceptance_if_needed(self):
     try:
         accepted_tos = self.config.getboolean("general", "accepted_tos")
     except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
         accepted_tos = False
     if not accepted_tos:
         # show the dialog and ensure the user accepts it
         res = show_accept_tos_dialog(get_parent(self))
         if not res:
             return False
         self.config.set("general", "accepted_tos", "yes")
         return True
     return True
Пример #4
0
 def _ask_for_tos_acceptance_if_needed(self):
     try:
         accepted_tos = self.config.getboolean("general", "accepted_tos")
     except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
         accepted_tos = False
     if not accepted_tos:
         # show the dialog and ensure the user accepts it
         res = show_accept_tos_dialog(get_parent(self))
         if not res:
             return False
         self.config.set("general", "accepted_tos", "yes")
         return True
     return True