-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add windows_file.template operation #651
base: 1.x
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## current pyinfra-dev/pyinfra#651 +/- ##
===========================================
- Coverage 92.51% 91.69% -0.83%
===========================================
Files 123 121 -2
Lines 7440 7367 -73
===========================================
- Hits 6883 6755 -128
- Misses 557 612 +55
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @timeisapear - thank you for adding this, looks great overall. Once minor comment and the tests - I'm happy to add tests after merging for this if you'd like me to?
|
||
.. code:: python | ||
|
||
files.template( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples need to be windows_files.templates
.
5a9e175
to
f01ba12
Compare
Mostly copy/pasted from file.template. One tweak is making the IO buffer-type bytes since win_rm _put_file expects a bytes input. Therefore output_file was changed from: ``` output_file = six.StringIO(output) ``` to ``` output_file = six.BytesIO(six.ensure_binary(output)) ``` References https://github.com/Fizzadar/pyinfra/issues/645
be8f856
to
325b214
Compare
v3 will remove Windows support (into a separate package, https://github.com/pyinfra-dev/pyinfra-windows. Once that's released I shall move this over and close this PR. |
Mostly copy/pasted from file.template. One tweak is making the IO buffer-type bytes since
winrm connector _put_file expects a bytes input. Therefore output_file was changed from:
to
References https://github.com/Fizzadar/pyinfra/issues/645
I have not added tests yet but may be able to add them later.