/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
618
618
        :param mode: Create the file with the given mode.
619
619
        :return: None
620
620
        """
621
 
        assert isinstance(bytes, str), \
622
 
            'bytes must be a plain string, not %s' % type(bytes)
 
621
        if not isinstance(bytes, str):
 
622
            raise AssertionError(
 
623
                'bytes must be a plain string, not %s' % type(bytes))
623
624
        return self.put_file(relpath, StringIO(bytes), mode=mode)
624
625
 
625
626
    def put_bytes_non_atomic(self, relpath, bytes, mode=None,
640
641
                        create it, and then try again.
641
642
        :param dir_mode: Possible access permissions for new directories.
642
643
        """
643
 
        assert isinstance(bytes, str), \
644
 
            'bytes must be a plain string, not %s' % type(bytes)
 
644
        if not isinstance(bytes, str):
 
645
            raise AssertionError(
 
646
                'bytes must be a plain string, not %s' % type(bytes))
645
647
        self.put_file_non_atomic(relpath, StringIO(bytes), mode=mode,
646
648
                                 create_parent_dir=create_parent_dir,
647
649
                                 dir_mode=dir_mode)
1243
1245
register_lazy_transport('ftp://', 'bzrlib.transport.ftp', 'FtpTransport')
1244
1246
register_lazy_transport('aftp://', 'bzrlib.transport.ftp', 'FtpTransport')
1245
1247
register_lazy_transport('memory://', 'bzrlib.transport.memory', 'MemoryTransport')
1246
 
register_lazy_transport('chroot+', 'bzrlib.transport.chroot',
1247
 
                        'ChrootTransportDecorator')
1248
1248
register_lazy_transport('readonly+', 'bzrlib.transport.readonly', 'ReadonlyTransportDecorator')
1249
1249
register_lazy_transport('fakenfs+', 'bzrlib.transport.fakenfs', 'FakeNFSTransportDecorator')
1250
1250
register_lazy_transport('vfat+',
1252
1252
                        'FakeVFATTransportDecorator')
1253
1253
register_lazy_transport('bzr://',
1254
1254
                        'bzrlib.transport.remote',
1255
 
                        'SmartTCPTransport')
 
1255
                        'RemoteTCPTransport')
1256
1256
register_lazy_transport('bzr+http://',
1257
1257
                        'bzrlib.transport.remote',
1258
 
                        'SmartHTTPTransport')
 
1258
                        'RemoteHTTPTransport')
1259
1259
register_lazy_transport('bzr+ssh://',
1260
1260
                        'bzrlib.transport.remote',
1261
 
                        'SmartSSHTransport')
 
1261
                        'RemoteSSHTransport')