Test failures in lp.scripts.tests.test_scriptmonitor on Python 2.7

Bug #1017981 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Martin Packman

Bug Description

When running on Python 2.7 there are three test failures:

    lp.scripts.tests.test_scriptmonitor.CheckScriptTestCase
        test_scriptfound
        test_scriptnotfound_hostname
        test_scriptnotfound_timing

All in the form:

    Traceback (most recent call last):
      File "/usr/lib/python2.7/unittest/case.py", line 318, in run
        self.setUp()
      File "/srv/branches/launchpad/tree/lib/lp/scripts/tests/test_scriptmonitor.py", line 29, in setUp
        self.log = logger(FakeOptions())
      File "/srv/branches/launchpad/tree/lib/lp/services/scripts/logger.py", line 362, in logger
        log_file=log_file, log_file_level=log_file_level)
      File "/srv/branches/launchpad/tree/lib/lp/services/scripts/logger.py", line 414, in _logger
        handler.setLevel(log_file_level)
      File "/usr/lib/python2.7/logging/__init__.py", line 710, in setLevel
        self.level = _checkLevel(level)
      File "/usr/lib/python2.7/logging/__init__.py", line 190, in _checkLevel
        raise TypeError("Level not an integer or a valid string: %r" % level)
    TypeError: Level not an integer or a valid string: None

This is because logging became more strict about what it accepts as a logging level.

Related branches

Martin Packman (gz)
Changed in launchpad:
assignee: nobody → Martin Packman (gz)
status: Triaged → In Progress
Curtis Hovey (sinzui)
tags: added: python-upgrade
removed: py27
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-untestable
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.