##// END OF EJS Templates
exec: remove last flag from is_exec
Matt Mackall -
r3997:3f0ba82c default
parent child Browse files
Show More
@@ -710,7 +710,7 b' def checkexec(path):'
710 def execfunc(path, fallback):
710 def execfunc(path, fallback):
711 '''return an is_exec() function with default to fallback'''
711 '''return an is_exec() function with default to fallback'''
712 if checkexec(path):
712 if checkexec(path):
713 return lambda x: is_exec(os.path.join(path, x), False)
713 return lambda x: is_exec(os.path.join(path, x))
714 return fallback
714 return fallback
715
715
716 # Platform specific variants
716 # Platform specific variants
@@ -772,9 +772,6 b" if os.name == 'nt':"
772 '''return False if pid dead, True if running or not known'''
772 '''return False if pid dead, True if running or not known'''
773 return True
773 return True
774
774
775 def is_exec(f, last):
776 return last
777
778 def set_exec(f, mode):
775 def set_exec(f, mode):
779 pass
776 pass
780
777
@@ -849,7 +846,7 b' else:'
849 pf = pf[1:-1] # Remove the quotes
846 pf = pf[1:-1] # Remove the quotes
850 return pf
847 return pf
851
848
852 def is_exec(f, last):
849 def is_exec(f):
853 """check whether a file is executable"""
850 """check whether a file is executable"""
854 return (os.lstat(f).st_mode & 0100 != 0)
851 return (os.lstat(f).st_mode & 0100 != 0)
855
852
General Comments 0
You need to be logged in to leave comments. Login now