Mercurial > hg > mercurial-crew
diff mercurial/util.py @ 4516:96d8a56d4ef9
Removed trailing whitespace and tabs from python files
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 06 Jun 2007 20:22:52 +0200 |
parents | 0026ccc2bf23 |
children | 36abb07c79d4 |
line wrap: on
line diff
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -823,7 +823,7 @@ if inst.errno != 0: raise self.close() raise IOError(errno.EPIPE, 'Broken pipe') - + def flush(self): try: return self.fp.flush() @@ -912,7 +912,7 @@ # username and groupname functions above, too. def isowner(fp, st=None): return True - + def find_in_path(name, path, default=None): '''find name in search path. path can be string (will be split with os.pathsep), or iterable thing that returns strings. if name @@ -920,17 +920,17 @@ using cmd.exe rules, using PATHEXT.''' if isinstance(path, str): path = path.split(os.pathsep) - + pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD') pathext = pathext.lower().split(os.pathsep) isexec = os.path.splitext(name)[1].lower() in pathext - + for p in path: p_name = os.path.join(p, name) - + if isexec and os.path.exists(p_name): return p_name - + for ext in pathext: p_name_ext = p_name + ext if os.path.exists(p_name_ext): @@ -1074,7 +1074,7 @@ if st is None: st = fstat(fp) return st.st_uid == os.getuid() - + def find_in_path(name, path, default=None): '''find name in search path. path can be string (will be split with os.pathsep), or iterable thing that returns strings. if name