Skip to content

Commit

Permalink
added error messages in case of missing package (#1996)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirshbergshachar authored Aug 21, 2018
1 parent 2b13aa0 commit 691a75d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Tests/scripts/validate_files_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
Note - if it is run for all the files in the repo it won't check releaseNotes, use `setContentDescriptor.sh` for that task.
"""
import pip

import sys
try:
import yaml
except ImportError:
pip.main(['install', 'pyyaml'])
import yaml
print "Please install pyyaml, you can do it by running: `pip install pyyaml`"
sys.exit(1)
try:
import pykwalify
except ImportError:
print "Please install pykwalify, you can do it by running: `pip install -I pykwalify`"
sys.exit(1)
import json
import sys
import re
import os
from subprocess import Popen, PIPE
Expand Down Expand Up @@ -75,7 +79,6 @@ class LOG_COLORS:
def print_color(str, color):
print(color + str + LOG_COLORS.NATIVE)


def print_error(error_str):
print_color(error_str, LOG_COLORS.RED)

Expand Down

0 comments on commit 691a75d

Please sign in to comment.