Ejemplo n.º 1
0
 def _update_failed(self):
     msg = "Failed to update domains list"
     if path.isfile(config.domain_blacklist_file):
         msg += "\nThe previously saved blacklist will be used"
     else:
         config.domain_blacklist_enabled = False
         msg += "\nDomain blacklist checking was disabled"
     error_utils.show_warning(msg)
Ejemplo n.º 2
0
 def close_existing_session(self):
     url = "http://localhost:%s/json" % config.chrome_debugging_port
     try:
         requests.get(url)
     except ConnectionError:
         return
     msg = "Chrome remote debugger already running on port %s." % config.chrome_debugging_port
     msg += "\nClosing it now. Use different ports to run multiple instances."
     error_utils.show_warning(msg)
     self.send_browser_close()
     time.sleep(5)
Ejemplo n.º 3
0
 def _print_warning(self):
     msg = "Java not found at location: %s" % config.java_binary
     msg += "\nDisabling HTML Validator."
     msg += "\nInstall/configure Java in your system to use HTML Validator."
     error_utils.show_warning(msg)
Ejemplo n.º 4
0
 def _show_keep_open_warning(self):
     msg = "Keeping browser and remote debugger open"
     msg += "\nYou can manually inspect it on http://localhost:%s" % config.chrome_debugging_port
     error_utils.show_warning(msg)
Ejemplo n.º 5
0
 def _disable_if_no_file(self):
     if not path.isfile(config.domain_blacklist_file):
         config.domain_blacklist_enabled = False
         msg = "Blacklist file not found, but auto update is disabled"
         msg += "\nDomain blacklist checking was disabled"
         error_utils.show_warning(msg)
Ejemplo n.º 6
0
 def check(self):
     if not self.blacklist:
         error_utils.show_warning("Domain blacklist is empty or file is not readable")
         return
     self._check_resources()
     self._check_external_links()
Ejemplo n.º 7
0
 def close_previously_unclosed(self):
     msg = "Chrome desktop instance is already running on port %s" % config.chrome_debugging_port
     msg += "\nClosing it now..."
     error_utils.show_warning(msg)
     self.close()
     time.sleep(5)
Ejemplo n.º 8
0
 def _print_warning(self):
     msg = "Java not found at location: %s" % config.java_binary
     msg += "\nHTML Validation will be omitted."
     msg += "\nInstall Java to use HTML Validator or disable it to not show this message."
     msg += "\nYou can provide custom Java location in file: %s (option 'java_binary')" % config.ini_file
     error_utils.show_warning(msg)
Ejemplo n.º 9
0
 def close_previously_unclosed(self):
     msg = "Chrome on Android device is already connected on port %s" % config.chrome_debugging_port
     msg += "\nDisconnecting it now..."
     error_utils.show_warning(msg)
     self.close()