#NEWLINE# def reject_old_python_versions( minimum_version ) : #NEWLINE# #INDENT# 'Guard against old python versions.\n\n  Args:\n    minimum_version: a tuple that indicates the minimum Python version.\n  ' #NEWLINE# minimum_version_string = '.' . join ( ( str ( minimum_version_string ) for x in minimum_version ) ) #NEWLINE# if ( not hasattr ( sys , 'version_info' ) ) : #NEWLINE# #INDENT# sys . stderr . write ( ( 'Very old versions of Python are not supported. Please use version %s.\n' % minimum_version_string ) ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# if ( sys . version_info < minimum_version ) : #NEWLINE# #INDENT# sys . stderr . write ( ( 'Error: Python %d.%d is not supported. Please use version %s.\n' % ( sys . version_info [ 0 ] , sys . version_info [ 1 ] , minimum_version_string ) ) ) #NEWLINE# sys . exit ( 1 )