diff --git a/platformio/remote/projectsync.py b/platformio/remote/projectsync.py index 1715145f..cdb61a28 100644 --- a/platformio/remote/projectsync.py +++ b/platformio/remote/projectsync.py @@ -17,7 +17,11 @@ import tarfile from binascii import crc32 from os.path import getmtime, getsize, isdir, isfile, join -from twisted.python import constants # pylint: disable=import-error +try: + from twisted.python import constants # pylint: disable=import-error +except ImportError: + # https://docs.twisted.org/en/twisted-16.5.0/core/howto/constants.html + import constantly as constants # pylint: disable=import-error from platformio.compat import hashlib_encode_data