~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Launchpad Translations on behalf of bzr-core
  • Date: 2012-09-19 04:30:25 UTC
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: launchpad_translations_on_behalf_of_bzr-core-20120919043025-pp4hyidvmbd57hyg
Launchpad automatic translations update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011, 2016 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
593
593
                                    create_parent_dir=create_parent_dir,
594
594
                                    dir_mode=dir_mode)
595
595
 
596
 
    def put_bytes_non_atomic(self, relpath, raw_bytes, mode=None,
 
596
    def put_bytes_non_atomic(self, relpath, bytes, mode=None,
597
597
                             create_parent_dir=False,
598
598
                             dir_mode=None):
599
 
        if not isinstance(raw_bytes, str):
600
 
            raise TypeError(
601
 
                'raw_bytes must be a plain string, not %s' % type(raw_bytes))
602
 
 
603
599
        def writer(fout):
604
 
            fout.write(raw_bytes)
 
600
            fout.write(bytes)
605
601
        self._put_non_atomic_helper(relpath, writer, mode=mode,
606
602
                                    create_parent_dir=create_parent_dir,
607
603
                                    dir_mode=dir_mode)