~david-goetz/swift/zero_byte_obj_audit

« back to all changes in this revision

Viewing changes to test/unit/common/test_utils.py

  • Committer: Tarmac
  • Author(s): David Goetz
  • Date: 2011-01-26 23:56:47 UTC
  • mfrom: (176.1.2 bare_except)
  • Revision ID: tarmac-20110126235647-rvhywh8z0vh2qm4j
Removing bare excepts from code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
        testroot = os.path.join(os.path.dirname(__file__), 'mkdirs')
108
108
        try:
109
109
            os.unlink(testroot)
110
 
        except:
 
110
        except Exception:
111
111
            pass
112
112
        rmtree(testroot, ignore_errors=1)
113
113
        self.assert_(not os.path.exists(testroot))
211
211
        try:
212
212
            for line in lfo:
213
213
                pass
214
 
        except:
 
214
        except Exception:
215
215
            got_exc = True
216
216
        self.assert_(got_exc)
217
217
        got_exc = False
218
218
        try:
219
219
            for line in lfo.xreadlines():
220
220
                pass
221
 
        except:
 
221
        except Exception:
222
222
            got_exc = True
223
223
        self.assert_(got_exc)
224
224
        self.assertRaises(IOError, lfo.read)