Skip to content

Commit

Permalink
Fix fabric#310 - use octal, not string rep
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Mar 23, 2011
1 parent bc0fe58 commit 5afe16f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/changes/1.0.1.rst
Expand Up @@ -12,6 +12,11 @@ Bugfixes
* :issue:`301`: Fixed a bug in `~fabric.operations.local`'s behavior when
``capture=False`` and ``output.stdout`` (or ``.stderr``) was also ``False``.
Thanks to Chris Rose for the catch.
* :issue:`310`: Update edge case in `~fabric.operations.put` where using the
``mode`` kwarg alongside ``use_sudo=True`` runs a hidden
`~fabric.operations.sudo` command. The ``mode`` kwarg needs to be octal but
was being interpolated in the ``sudo`` call as a string/integer. Thanks to
Adam Ernst for the catch and suggested fix.
* :issue:`311`: `~fabric.contrib.files.append` was supposed to have its
``partial`` kwarg's default flipped from ``True`` to ``False``. However, only
the documentation was altered. This has been fixed. Thanks to Adam Ernst for
Expand Down
2 changes: 1 addition & 1 deletion fabric/sftp.py
Expand Up @@ -243,7 +243,7 @@ def put(self, local_path, remote_path, use_sudo, mirror_local_mode, mode,
if lmode != rmode:
if use_sudo:
with hide('everything'):
sudo('chmod %s \"%s\"' % (lmode, remote_path))
sudo('chmod %o \"%s\"' % (lmode, remote_path))
else:
self.ftp.chmod(remote_path, lmode)
if use_sudo:
Expand Down

0 comments on commit 5afe16f

Please sign in to comment.