Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def __getattr__(self, key):

class LevelDifferentiatingFormatter(logging.Formatter):
def format(self, record):
if record.levelno > 20:
if record.levelno > 30:
record.msg = '{}{}[ERROR]{}{}: '.format(
Err_Style.BRIGHT, Err_Fore.RED, Err_Fore.RESET,
Err_Style.RESET_ALL) + record.msg
elif record.levelno > 20:
record.msg = '{}{}[WARNING]{}{}: '.format(
Err_Style.BRIGHT, Err_Fore.RED, Err_Fore.RESET,
Err_Style.RESET_ALL) + record.msg
Expand All @@ -111,6 +115,7 @@ def format(self, record):
info = logger.info
debug = logger.debug
warning = logger.warning
error = logger.error


IS_PY3 = sys.version_info[0] >= 3
Expand Down Expand Up @@ -1008,7 +1013,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
'android-{}'.format(self.android_api),
platform_dir)
if not exists(self.ndk_platform):
warning('ndk_platform doesn\'t exist')
warning('ndk_platform doesn\'t exist: {}'.format(self.ndk_platform))
ok = False

py_platform = sys.platform
Expand Down Expand Up @@ -1065,6 +1070,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
executable))

if not ok:
error('{}python-for-android cannot continue; aborting{}'.format(Err_Fore.RED, Err_Fore.RESET))
sys.exit(1)

def __init__(self):
Expand Down