Changeset masterdriverz%2Fpkgcore-dev,2286
- Timestamp:
- 07/18/08 10:38:33 (5 weeks ago)
- Author:
- Charlie Shepherd <masterdriverz@…>
- Message:
-
Fix for ticket 128, probably not the final solution
- Location:
- masterdriverz/pkgcore-dev/pkgcore/fs
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r~2231
|
r2286
|
|
| 169 | 169 | yield f(f2(x.location)) |
| 170 | 170 | except OSError, oe: |
| 171 | | if oe.errno != errno.ENOENT: |
| | 171 | if oe.errno not in (errno.ENOENT, errno.ENOTDIR): |
| 172 | 172 | raise |
| 173 | 173 | del oe |
| … |
… |
|
| 186 | 186 | obj = gen_obj(new_loc) |
| 187 | 187 | except (OSError, IOError), e: |
| 188 | | if e.errno != errno.ENOENT: |
| | 188 | if e.errno not in (errno.ENOENT, errno.ENOTDIR): |
| 189 | 189 | raise |
| 190 | 190 | continue |
-
|
r2241
|
r2286
|
|
| 231 | 231 | # lstat gen_obj uses internally; this is the equivalent of |
| 232 | 232 | # "deference that link" |
| 233 | | obj = gen_obj(x.location, stat=os.stat(x.location)) |
| | 233 | obj = gen_obj(x.location, stat=os.stat(x.location)) |
| 234 | 234 | if not fs.isdir(obj): |
| 235 | | raise Exception( |
| 236 | | "%s exists and needs to be a dir, but is a %s" % |
| 237 | | (x.location, obj)) |
| | 235 | os.unlink(x.location) |
| | 236 | mkdir(x) |
| 238 | 237 | ensure_perms(x, obj) |
| 239 | 238 | except OSError, oe: |