Message22768
Logged In: YES
user_id=469548
Yes, I think this is the right way to go about it. I'd
personally make a couple of changes, but those are up to
your discretion:
* Factor out the try: except:'s to a nested function.
* Use sys.exc_info() instead of the exception for backwards
compatibility.
* Use 'os.path.isdir(fullname) and not
os.path.islink(fullname)' expression instead of the lstat
call. I think it more clearly communicates what we want,
even though it's more stat calls.
Latest version attached (rmtree-refactored.py). |
|
| Date |
User |
Action |
Args |
| 2007-08-23 14:26:48 | admin | link | issue1048941 messages |
| 2007-08-23 14:26:48 | admin | create | |
|