diff options
author | James Cammarata <jimi@sngx.net> | 2015-09-30 08:08:57 -0400 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2015-09-30 08:08:57 -0400 |
commit | af0fa26308e1d8faa09436b623fc2c91fafca169 (patch) | |
tree | 8852dc4182a20b629722be35387a36dc6c74223b | |
parent | 7fbaf3aa4a416031045d5698ad79f1a79eee6813 (diff) | |
parent | e62ca77aeb225d02588d33e45d9e5334f99e92b8 (diff) | |
download | ansible-af0fa26308e1d8faa09436b623fc2c91fafca169.tar.gz |
Merge pull request #12566 from cchurch/winrm_put_empty_file_19
Enable winrm put_file to upload an empty file.
-rw-r--r-- | lib/ansible/runner/connection_plugins/winrm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/runner/connection_plugins/winrm.py b/lib/ansible/runner/connection_plugins/winrm.py index b41a74c8e1..3b70ce702e 100644 --- a/lib/ansible/runner/connection_plugins/winrm.py +++ b/lib/ansible/runner/connection_plugins/winrm.py @@ -185,7 +185,7 @@ class Connection(object): # windows command length), divide by 2.67 (UTF16LE base64 command # encoding), then by 1.35 again (data base64 encoding). buffer_size = int(((8190 - len(cmd)) / 2.67) / 1.35) - for offset in xrange(0, in_size, buffer_size): + for offset in xrange(0, in_size or 1, buffer_size): try: out_data = in_file.read(buffer_size) if offset == 0: |