~ubuntu-branches/ubuntu/utopic/awscli/utopic

« back to all changes in this revision

Viewing changes to .pc/adopt_to_botocore_changes/awscli/testutils.py

  • Committer: Package Import Robot
  • Author(s): TANIGUCHI Takaki
  • Date: 2014-07-06 18:25:37 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140706182537-lzd1xuiul28vjcow
Tags: 1.3.21-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
291
291
        captured_stdout = six.StringIO()
292
292
        with mock.patch('sys.stderr', captured_stderr):
293
293
            with mock.patch('sys.stdout', captured_stdout):
294
 
                rc = self.driver.main(cmdlist)
 
294
                try:
 
295
                    rc = self.driver.main(cmdlist)
 
296
                except SystemExit as e:
 
297
                    # We need to catch SystemExit so that we
 
298
                    # can get a proper rc and still present the
 
299
                    # stdout/stderr to the test runner so we can
 
300
                    # figure out what went wrong.
 
301
                    rc = e.code
295
302
        stderr = captured_stderr.getvalue()
296
303
        stdout = captured_stdout.getvalue()
297
304
        self.assertEqual(