equal
deleted
inserted
replaced
137 elif os.WIFSTOPPED(code): |
137 elif os.WIFSTOPPED(code): |
138 val = os.WSTOPSIG(code) |
138 val = os.WSTOPSIG(code) |
139 return _("stopped by signal %d") % val, val |
139 return _("stopped by signal %d") % val, val |
140 raise ValueError(_("invalid exit code")) |
140 raise ValueError(_("invalid exit code")) |
141 |
141 |
142 def isowner(fp, st=None): |
142 def isowner(st): |
143 """Return True if the file object f belongs to the current user. |
143 """Return True if the stat object st is from the current user.""" |
144 |
|
145 The return value of a util.fstat(f) may be passed as the st argument. |
|
146 """ |
|
147 if st is None: |
|
148 st = fstat(fp) |
|
149 return st.st_uid == os.getuid() |
144 return st.st_uid == os.getuid() |
150 |
145 |
151 def find_exe(command): |
146 def find_exe(command): |
152 '''Find executable for command searching like which does. |
147 '''Find executable for command searching like which does. |
153 If command is a basename then PATH is searched for command. |
148 If command is a basename then PATH is searched for command. |