~canonical-platform-qa/ubuntu-system-tests/trying-reproduce-timeout-issue

« back to all changes in this revision

Viewing changes to ubuntu_system_tests/helpers/job.py

  • Committer: Tarmac
  • Author(s): Heber Parrucci
  • Date: 2016-11-04 14:58:31 UTC
  • mfrom: (475.1.5 fixing-list-tests)
  • Revision ID: tarmac-20161104145831-k4c8overpkq8crml
Fixing issue when listing ubuntu system tests:

autopilot3 list ubuntu_system_tests.tests.

Approved by Richard Huddie, platform-qa-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        """Check if job is supported
75
75
        :return True if job is supported, False otherwise
76
76
        """
77
 
        return 'Unknown job' not in self.get_status(*args, **kwargs)
 
77
        try:
 
78
            output = self.get_status(*args, **kwargs)
 
79
        except (subprocess.CalledProcessError, ValueError):
 
80
            return False
 
81
        else:
 
82
            return 'Unknown job' not in output
78
83
 
79
84
    def wait_for_job_spawned(self, timeout=10):
80
85
        """Wait until the named job is in spawned state."""