Improve venv command, log and bashrc

This commit is contained in:
utahta
2011-08-06 23:56:31 +09:00
parent 12b392a98c
commit 04f4cd15b3
23 changed files with 257 additions and 213 deletions
+18 -18
View File
@@ -1,5 +1,5 @@
import sys
from pythonbrew.basecommand import Command
from pythonbrew.log import logger
from pythonbrew.installer.pythoninstaller import PythonInstaller,\
PythonInstallerMacOSX
from pythonbrew.util import is_macosx
@@ -63,22 +63,22 @@ class InstallCommand(Command):
)
def run_command(self, options, args):
if args:
# installing python
for arg in args:
try:
if is_macosx():
p = PythonInstallerMacOSX(arg, options)
else:
p = PythonInstaller(arg, options)
p.install()
except UnknownVersionException:
continue
except AlreadyInstalledException:
continue
except NotSupportedVersionException:
continue
else:
logger.info("Unknown python version.")
if not args:
self.parser.print_help()
sys.exit(1)
# installing python
for arg in args:
try:
if is_macosx():
p = PythonInstallerMacOSX(arg, options)
else:
p = PythonInstaller(arg, options)
p.install()
except UnknownVersionException:
continue
except AlreadyInstalledException:
continue
except NotSupportedVersionException:
continue
InstallCommand()