def check_client(self): try: return VCSClientBase.check_client(self) except UserSideException: raise UserSideException( "Please install Git client from https://git-scm.com/downloads" )
def ensure_python3(raise_exception=True): compatible = sys.version_info >= (3, 6) if not raise_exception or compatible: return compatible raise UserSideException( "Python 3.6 or later is required for this operation. \n" "Please check a migration guide:\n" "https://docs.platformio.org/en/latest/core/migration.html" "#drop-support-for-python-2-and-3-5")
def ensure_python3(raise_exception=True): compatible = sys.version_info >= (3, 6) if not raise_exception or compatible: return compatible raise UserSideException( "Python 3.6 or later is required for this operation. \n" "Please install the latest Python 3 and reinstall PlatformIO Core using " "installation script:\n" "https://docs.platformio.org/page/core/installation.html")
def ensure_python3(raise_exception=True): if not raise_exception or not PY2: return not PY2 raise UserSideException( "Python 3.5 or later is required for this operation. \n" "Please install the latest Python 3 and reinstall PlatformIO Core using " "installation script:\n" "https://docs.platformio.org/page/core/installation.html" )
def check_client(self): try: assert self.command if self.silent: self.get_cmd_output(["--version"]) else: assert self.run_cmd(["--version"]) except (AssertionError, OSError, PlatformioException): raise UserSideException( "VCS: `%s` client is not installed in your system" % self.command ) return True
def __init__(self, manifest_path): self._id = os.path.basename(manifest_path)[:-5] assert os.path.isfile(manifest_path) self.manifest_path = manifest_path try: self._manifest = fs.load_json(manifest_path) except ValueError: raise InvalidBoardManifest(manifest_path) if not set(["name", "url", "vendor"]) <= set(self._manifest): raise UserSideException( "Please specify name, url and vendor fields for " + manifest_path)