From cb0f3d844fea65fb55c701e283a548ffcec73cea Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sat, 14 Mar 2015 19:40:41 -0700 Subject: [PATCH] Make cg2glsl.py fail gracefully if python is too old --- tools/cg2glsl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/cg2glsl.py b/tools/cg2glsl.py index 1db1a47c39..8f81bfbb6b 100755 --- a/tools/cg2glsl.py +++ b/tools/cg2glsl.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python """ Python 3 script which converts simple RetroArch Cg shaders to modern GLSL (ES) format. @@ -7,6 +7,10 @@ License: Public domain """ import sys +if sys.version_info<(3,0,0): + sys.stderr.write("You need python 3.0 or later to run this script\n") + exit(1) + import os import errno import subprocess