mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Fix "AttributeError: module 'platformio.exception' has no attribute 'InternetIsOffline'"
This commit is contained in:
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# pylint: disable=no-member, no-self-use, unused-argument, too-many-lines
|
# pylint: disable=no-self-use, unused-argument, too-many-lines
|
||||||
# pylint: disable=too-many-instance-attributes, too-many-public-methods
|
# pylint: disable=too-many-instance-attributes, too-many-public-methods
|
||||||
# pylint: disable=assignment-from-no-return
|
# pylint: disable=assignment-from-no-return
|
||||||
|
|
||||||
@ -33,6 +33,7 @@ from SCons.Script import DefaultEnvironment # pylint: disable=import-error
|
|||||||
|
|
||||||
from platformio import exception, fs, util
|
from platformio import exception, fs, util
|
||||||
from platformio.builder.tools import platformio as piotool
|
from platformio.builder.tools import platformio as piotool
|
||||||
|
from platformio.clients.http import InternetIsOffline
|
||||||
from platformio.compat import WINDOWS, hashlib_encode_data, string_types
|
from platformio.compat import WINDOWS, hashlib_encode_data, string_types
|
||||||
from platformio.package.exception import UnknownPackageError
|
from platformio.package.exception import UnknownPackageError
|
||||||
from platformio.package.manager.library import LibraryPackageManager
|
from platformio.package.manager.library import LibraryPackageManager
|
||||||
@ -882,7 +883,7 @@ class ProjectAsLibBuilder(LibBuilderBase):
|
|||||||
try:
|
try:
|
||||||
lm.install(spec)
|
lm.install(spec)
|
||||||
did_install = True
|
did_install = True
|
||||||
except (UnknownPackageError, exception.InternetIsOffline) as e:
|
except (UnknownPackageError, InternetIsOffline) as e:
|
||||||
click.secho("Warning! %s" % e, fg="yellow")
|
click.secho("Warning! %s" % e, fg="yellow")
|
||||||
|
|
||||||
# reset cache
|
# reset cache
|
||||||
|
Reference in New Issue
Block a user