forked from platformio/platformio-core
Check zeroconf installation before adding to setuptools
This commit is contained in:
1 parent
9f2875fcd7
commit
c6abdf8206
3 files changed
+28
-3
No files matched your search
@@ -227,3 +227,10 @@ class CygwinEnvDetected(PlatformioException):
|
||||
|
||||
MESSAGE = "PlatformIO does not work within Cygwin environment. "\
|
||||
"Use native Terminal instead."
|
||||
|
||||
|
||||
class ZeroconfIsNotInstalled(PlatformioException):
|
||||
|
||||
MESSAGE = "Python multicast DNS service discovery library has not been "\
|
||||
"installed automatically. Please open terminal and run \n"\
|
||||
"> pip install zeroconf"
|
||||
+4
-1
@@ -32,7 +32,6 @@ from time import sleep, time
|
||||
|
||||
import click
|
||||
import requests
|
||||
import zeroconf
|
||||
|
||||
from platformio import __apiurl__, __version__, exception
|
||||
|
||||
@@ -493,6 +492,10 @@ get_logicaldisks = lambda: [{
|
||||
|
||||
|
||||
def get_mdns_services():
|
||||
try:
|
||||
import zeroconf
|
||||
except ImportError:
|
||||
raise exception.ZeroconfIsNotInstalled()
|
||||
|
||||
class mDNSListener(object):
|
||||
|
||||
|
||||
Reference in new issue
Block a user