~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/nosmart.py

  • Committer: John Arbash Meinel
  • Author(s): Mark Hammond
  • Date: 2008-09-09 17:02:21 UTC
  • mto: This revision was merged to the branch mainline in revision 3697.
  • Revision ID: john@arbash-meinel.com-20080909170221-svim3jw2mrz0amp3
An updated transparent icon for bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Implementation of Transport that never has a smart medium.
18
18
 
21
21
to never have a smart medium.
22
22
"""
23
23
 
24
 
from __future__ import absolute_import
25
 
 
26
24
from bzrlib import errors
27
 
from bzrlib.transport import decorator
28
 
 
29
 
 
30
 
class NoSmartTransportDecorator(decorator.TransportDecorator):
 
25
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
 
26
 
 
27
 
 
28
class NoSmartTransportDecorator(TransportDecorator):
31
29
    """A decorator for transports that disables get_smart_medium."""
32
30
 
33
31
    @classmethod
38
36
        raise errors.NoSmartMedium(self)
39
37
 
40
38
 
 
39
class NoSmartTransportServer(DecoratorServer):
 
40
    """Server for the NoSmartTransportDecorator for testing with."""
 
41
 
 
42
    def get_decorator_class(self):
 
43
        return NoSmartTransportDecorator
 
44
 
 
45
 
41
46
def get_test_permutations():
42
47
    """Return the permutations to be used in testing."""
43
 
    from bzrlib.tests import test_server
44
 
    return [(NoSmartTransportDecorator, test_server.NoSmartTransportServer)]
 
48
    return [(NoSmartTransportDecorator, NoSmartTransportServer)]
45
49