Skip to content

Commit

Permalink
Merge pull request #353 from demisto/FixHelpersWarnings
Browse files Browse the repository at this point in the history
Corrected typo in warning message
  • Loading branch information
DeanArbel committed Apr 20, 2020
2 parents f3ad390 + f2a46f3 commit 1df3412
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demisto_sdk/commands/lint/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@

def validate_env() -> None:
"""Packs which use python2 will need to be run inside virtual enviorment including python2 as main and the specified req"""
wrn_msg = 'Demsito-sdk lint not in virtual enviorment, Python2 lints will fail, use "source .hooks/bootstrap.sh"' \
' to create the virtual enviorment'
command = "python -c \"import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))\""
stdout, stderr, exit_code = run_command_os(command, cwd=Path().cwd())
if "2" not in stdout:
print_warning('Demsito-sdk lint not in virtual enviorment, Python2 lints will failed, use "source '
'.hooks/bootstrap.sh" to create the virtual enviorment')
print_warning(wrn_msg)
else:
stdout, stderr, exit_code = run_command_os("pip3 freeze", cwd=Path().cwd())
for req in PYTHON2_REQ:
if req not in stdout:
print_warning('Demsito-sdk lint not in virtual enviorment, Python2 lints will failed, use "source '
'.hooks/bootstrap.sh" to create the virtual enviorment')
print_warning(wrn_msg)


def build_skipped_exit_code(no_flake8: bool, no_bandit: bool, no_mypy: bool, no_pylint: bool, no_vulture: bool,
Expand Down

0 comments on commit 1df3412

Please sign in to comment.