git-repo/subcmds
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
..
__init__.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
abandon.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
branches.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
checkout.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
cherry_pick.py Fix: Missing spaces in printed messages 2013-03-05 17:30:59 +09:00
diff.py Option for 'repo diff' to generate output suitable for 'patch' cmd 2012-04-13 09:20:10 -07:00
download.py Tidy up code formatting a bit more 2012-11-14 12:09:38 +09:00
forall.py Add regex support for subcommand forall 2013-04-29 16:19:26 +05:30
grep.py Tidy up code formatting a bit more 2012-11-14 12:09:38 +09:00
help.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
info.py Remove unused show_smart option on list and info commands 2013-05-16 09:32:18 +09:00
init.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
list.py Remove unused show_smart option on list and info commands 2013-05-16 09:32:18 +09:00
manifest.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
overview.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
prune.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
rebase.py Fix: Missing spaces in printed messages 2013-03-05 17:30:59 +09:00
selfupdate.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
smartsync.py Clean up imports 2012-09-18 09:54:57 +02:00
stage.py stage: replace filter on lambda with list comprehension 2013-05-08 06:37:15 +01:00
start.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
status.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
sync.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
upload.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
version.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00