Permalink
Browse files

has to work in python 2.4 as well

(lower versions are not supported, and 2.5 or higher was fine)
  • Loading branch information...
1 parent 4f2184e commit ca6f0b893b68e3ed2cc7ab77375b4a85c4c6b27b Klaas Bosteels committed Oct 10, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 dumbo.py
View
@@ -139,8 +139,9 @@ def execute(cmd,opts=[],precmd="",printcmd=True,stdout=sys.stdout,stderr=sys.std
return system(cmd,stdout,stderr)
def system(cmd,stdout=sys.stdout,stderr=sys.stderr):
+ if sys.version[:3] == "2.4": return os.system(cmd) / 256
proc = subprocess.Popen(cmd,shell=True,stdout=stdout,stderr=stderr)
- return os.waitpid(proc.pid,0)[1] / 256 # exit status
+ return os.waitpid(proc.pid,0)[1] / 256
def findjar(hadoop,name):
jardir = hadoop + "/build/contrib/" + name

0 comments on commit ca6f0b8

Please sign in to comment.