Skip to content

Commit

Permalink
Wrap python2.7 error message
Browse files Browse the repository at this point in the history
Wraps python2.7 error message with user-friendly error message

Resolves tern-tools#362

Signed-off-by: Prajwal M <[email protected]>
  • Loading branch information
PrajwalM2212 authored and rnjudge committed Aug 28, 2019
1 parent 983b1ff commit 1197d05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tern/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ def main():
args = parser.parse_args()

# execute
do_main(args)
if sys.version_info < (3, 0):
sys.stderr.write("Error running Tern. Please check that python3 "
"is configured as default.\n")
else:
do_main(args)


if __name__ == "__main__":
Expand Down

0 comments on commit 1197d05

Please sign in to comment.