diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2011-12-05 10:30:14 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2011-12-05 10:30:14 +0100 |
commit | 492a8c22838f52d579e4b9f31cd08f4dbcccb45c (patch) | |
tree | 5fca1c05d2ead281ab192d293e210f93cbb978bc /src/linux/integration-test | |
parent | 14761c09d27934188829e3c804aca6593757ed9b (diff) | |
download | upower-492a8c22838f52d579e4b9f31cd08f4dbcccb45c.tar.gz |
Revert "src/linux/integration-test: Do not crash on absent _outcomeForDoCleanups"
This reverts commit 14761c09d27934188829e3c804aca6593757ed9b.
The real reason for the failure is that Makefile.am calls the script with
"python" which is Python 2, but we need Python 3.
Diffstat (limited to 'src/linux/integration-test')
-rwxr-xr-x | src/linux/integration-test | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/linux/integration-test b/src/linux/integration-test index 871d5e8..cc2b329 100755 --- a/src/linux/integration-test +++ b/src/linux/integration-test @@ -88,18 +88,11 @@ class Tests(unittest.TestCase): shutil.rmtree(self.sysfs) # on failures, print daemon log - try: - if self._outcomeForDoCleanups.success: - return - except AttributeError: - # _outcomeForDoCleanups is a private member which seems to be a bit - # unreliable; if it does not exist, just ignore it - return - - with open(self.log.name) as f: - sys.stderr.write('\n-------------- daemon log: ----------------\n') - sys.stderr.write(f.read()) - sys.stderr.write('------------------------------\n') + if not self._outcomeForDoCleanups.success: + with open(self.log.name) as f: + sys.stderr.write('\n-------------- daemon log: ----------------\n') + sys.stderr.write(f.read()) + sys.stderr.write('------------------------------\n') # # Methods for fake sysfs |