diff options
| author | bwarsaw | 2002-12-07 07:36:24 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-12-07 07:36:24 +0000 |
| commit | 37884281c8404ba421c50131dbd639350c51ef83 (patch) | |
| tree | c83085c46c7ea7c1f5368c56616e0fcd1c917b67 /Mailman/Archiver/HyperArch.py | |
| parent | 6cc067124d7835f21cd0fd25112f45141b040e8e (diff) | |
| download | mailman-37884281c8404ba421c50131dbd639350c51ef83.tar.gz mailman-37884281c8404ba421c50131dbd639350c51ef83.tar.zst mailman-37884281c8404ba421c50131dbd639350c51ef83.zip | |
Diffstat (limited to 'Mailman/Archiver/HyperArch.py')
| -rw-r--r-- | Mailman/Archiver/HyperArch.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py index 4a0a381c6..d8c2f2309 100644 --- a/Mailman/Archiver/HyperArch.py +++ b/Mailman/Archiver/HyperArch.py @@ -100,7 +100,13 @@ def null_to_space(s): def sizeof(filename, lang): - size = os.path.getsize(filename) + try: + size = os.path.getsize(filename) + except OSError, e: + # ENOENT can happen if the .mbox file was moved away or deleted, and + # an explicit mbox file name was given to bin/arch. + if e.errno <> errno.ENOENT: raise + return _('size not available') if size < 1000: # Avoid i18n side-effects otrans = i18n.get_translation() |
