[wgem] beginning install

This commit is contained in:
Vinícius Moreira
2019-12-10 19:25:30 -03:00
parent 37717d81dc
commit 49a3f12047
4 changed files with 35 additions and 20 deletions

View File

@@ -2,7 +2,6 @@ import logging
import os
import shutil
import tarfile
import traceback
from pathlib import Path
import requests
@@ -19,7 +18,7 @@ from bauh.gems.web import BIN_PATH, NODE_DIR_PATH, NODE_BIN_PATH, NPM_BIN_PATH,
from bauh.view.util.translation import I18n
class NodeUpdater:
class EnvironmentUpdater:
def __init__(self, logger: logging.Logger, http_client: HttpClient, file_downloader: FileDownloader, i18n: I18n):
self.logger = logger
@@ -27,11 +26,6 @@ class NodeUpdater:
self.i18n = i18n
self.http_client = http_client
def _is_internet_available(self) -> bool:
self.logger.info('Checking internet connection')
# TODO
return True
def _download_and_install(self, version: str, version_url: str, watcher: ProcessWatcher) -> bool:
self.logger.info("Downloading NodeJS {}: {}".format(version, version_url))