Go to file
David Pursehouse 59bbb580e3 Move Python version checking to a separate module
Add a new module with methods for checking the Python version.

Instead of handling Python3 imports with try...except blocks, first
check the python version and then import the relevant modules.  This
makes the code a bit cleaner and will result in less diff when/if we
remove support for Python < 3 later.

Use the same mechanism to handle `input` vs. `raw_input` and add
suppression of pylint warnings caused by redefinition of the built-in
method `input`.

Change-Id: Ia403e525b88d77640a741ac50382146e7d635924
Also-by: Chirayu Desai <cdesai@cyanogenmod.org>
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
2013-05-23 07:28:53 +00:00
docs Allow mirror to be created in directories specified by 'path' attribute 2013-04-11 08:59:09 +08:00
hooks Update the commit-msg hook to the version from Gerrit 2.5.2 2013-02-13 09:56:09 +09:00
subcmds Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
tests Fix inconsistent indentation 2012-11-14 11:38:57 +09:00
.gitattributes Protect line endings in shell scripts 2013-02-11 22:13:39 +01:00
.gitignore Add repoc to the .gitignore file 2013-03-08 01:18:08 +00:00
.project Set correct name in PyDev and Eclipse project config 2013-04-19 09:35:43 +09:00
.pydevproject Set correct name in PyDev and Eclipse project config 2013-04-19 09:35:43 +09:00
.pylintrc Disable warning about locally disabling pylint warnings 2013-05-15 18:06:06 +09:00
color.py Add nofmt_printer to color.py 2013-02-26 16:04:55 +09:00
command.py Optimise regex pattern compilation in FindProjects 2013-04-30 11:12:01 +09:00
COPYING Initial Contribution 2008-10-21 07:00:00 -07:00
editor.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
error.py Raise a NoManifestException when the manifest DNE 2012-11-15 18:50:11 -08:00
git_command.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
git_config.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
git_refs.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
git_ssh Don't allow git fetch to start ControlMaster 2010-10-29 08:15:14 -07:00
main.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
manifest_xml.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
pager.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
progress.py Support units in progress messages 2011-09-19 14:52:57 -07:00
project.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
pyversion.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
repo Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
SUBMITTING_PATCHES Add pylint configuration and instructions 2012-10-24 10:18:13 +09:00
trace.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00