[email protected] (Eric S. Raymond) writes:
> From: "Eric S. Raymond" <[email protected]>
> Date: Fri, 28 Dec 2012 11:40:59 -0500
> Subject: [PATCH] Add checks to Python scripts for version dependencies.
>
> ---
> contrib/ciabot/ciabot.py | 8 +++++++-
> ...
> diff --git a/contrib/fast-import/import-zips.py
> b/contrib/fast-import/import-zips.py
> index 82f5ed3..b989941 100755
> --- a/contrib/fast-import/import-zips.py
> +++ b/contrib/fast-import/import-zips.py
> @@ -9,10 +9,15 @@
> ## git log --stat import-zips
>
> from os import popen, path
> -from sys import argv, exit
> +from sys import argv, exit, hexversion
> from time import mktime
> from zipfile import ZipFile
>
> +if hexversion < 0x01060000:
I am assuming that you are carefully limiting what you import from
"sys" by adding only hexversion to the import above, but then can we
refer to sys.stderr below?
> + # The limiter is the zipfile module
> + sys.stderr.write("import-zips.py: requires Python 1.6.0 or later.\n")
> + sys.exit(1)
> +
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html