Your ROOT_URL in app.ini is https://git.hpc.odu.edu/ but you are visiting https://git.wahab.hpc.odu.edu/wirawan0/wpylib/commit/d27c00e9794f72fba4ae71961e36d535701fd094
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
14 additions and
1 deletions
shell_tools.py
@ -1,4 +1,4 @@
# $Id: shell_tools.py,v 1.2 2010-01-18 20:55:4 4 wirawan Exp $
# $Id: shell_tools.py,v 1.3 2010-01-20 17:25:5 4 wirawan Exp $
#
# wpylib.shell_tools
# Created: 20100106
@ -42,12 +42,25 @@ def errchk(cmd, args, retcode):
err = " Command %s returned %d " % ( cmd , retcode )
raise RuntimeError , err
def run ( prg , args ) :
retcode = subprocess . call ( ( prg , ) + args )
errchk ( prg , args , retcode )
return 0
def pipe_out ( args , split = False , shell = False ) :
""" Executes a shell command, piping out the stdout to python for parsing.
This is my customary shortcut for backtick operator .
The result is either a single string ( if split == False ) or a list of strings
with EOLs removed ( if split == True ) . """
retval = subprocess . Popen ( args , stdout = subprocess . PIPE , shell = shell ) . communicate ( ) [ 0 ]
if not split :
return retval
else :
return retval . splitlines ( )
# coreutils
def cp ( * args ) :