~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/features.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-07-27 03:03:49 UTC
  • mfrom: (6015.3.7 trivial)
  • Revision ID: pqm@pqm.ubuntu.com-20110727030349-wcq2ay0knn995ae4
(mbp) log a message when we get a EINVAL on a transport operation (Martin
 Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""
19
19
 
20
20
import os
21
 
import subprocess
22
21
import stat
23
22
import sys
24
23
import tempfile
166
165
        self.module_name = module_name
167
166
 
168
167
    def _probe(self):
169
 
        sentinel = object()
170
 
        module = sys.modules.get(self.module_name, sentinel)
171
 
        if module is sentinel:
172
 
            try:
173
 
                self._module = __import__(self.module_name, {}, {}, [''])
174
 
                return True
175
 
            except ImportError:
176
 
                return False
177
 
        else:
178
 
            self._module = module
 
168
        try:
 
169
            self._module = __import__(self.module_name, {}, {}, [''])
179
170
            return True
 
171
        except ImportError:
 
172
            return False
180
173
 
181
174
    @property
182
175
    def module(self):