Index: trunk/wmfmailadmin/mbcleanup.py |
— | — | @@ -28,10 +28,13 @@ |
29 | 29 | for domain in os.listdir(mbroot): |
30 | 30 | domaindir = os.path.join(mbroot, domain) |
31 | 31 | if not domain.startswith('.') and os.path.isdir(domaindir): |
32 | | - for localpart in os.listdir(domaindir): |
33 | | - if not localpart.startswith('.') and not localpart.find('@') and \ |
34 | | - os.path.isdir(os.path.join(domaindir, localpart)): |
35 | | - mailboxes.add((unicode(domain), unicode(localpart))) |
| 32 | + try: |
| 33 | + for localpart in os.listdir(domaindir): |
| 34 | + if not localpart.startswith('.') and not localpart.find('@') and \ |
| 35 | + os.path.isdir(os.path.join(domaindir, localpart)): |
| 36 | + mailboxes.add((unicode(domain), unicode(localpart))) |
| 37 | + except OSError, e: |
| 38 | + if e.errno != 13: raise |
36 | 39 | |
37 | 40 | return mailboxes |
38 | 41 | |