mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-06-18 03:38:57 +08:00
check that we're running Python 2.7+
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
if sys.version_info.major != 2:
|
||||
raise Exception("Python 3 is not supported")
|
||||
|
||||
if sys.version_info.minor < 7:
|
||||
raise Exception("Python 2.7 or greater is required")
|
||||
|
||||
# Hack around absolute paths
|
||||
current_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
parent_dir = os.path.abspath(current_dir + "/../")
|
||||
|
||||
Reference in New Issue
Block a user