mirror of
https://github.com/ansible/ansible.git
synced 2026-02-03 20:40:24 -05:00
Fix escaping issue in ansiballz wrapper for sitecustomize (#86236)
* Fix escaping issue in ansiballz wrapper for sitecustomize * add clog frag
This commit is contained in:
parent
bff3a9aeb9
commit
6bb7bd760f
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/ansiballz-wrapper-sitecustomize.yml
Normal file
2
changelogs/fragments/ansiballz-wrapper-sitecustomize.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- modules - fix AnsiballZ wrapper code escaping of sitecustomize
|
||||
|
|
@ -121,7 +121,7 @@ def _ansiballz_main(
|
|||
z = zipfile.ZipFile(modlib_path, mode='a')
|
||||
|
||||
# py3: modlib_path will be text, py2: it's bytes. Need bytes at the end
|
||||
sitecustomize = u'import sys\\nsys.path.insert(0,"%s")\\n' % modlib_path
|
||||
sitecustomize = 'import sys\nsys.path.insert(0, "%s")\n' % modlib_path
|
||||
sitecustomize = sitecustomize.encode('utf-8')
|
||||
# Use a ZipInfo to work around zipfile limitation on hosts with
|
||||
# clocks set to a pre-1980 year (for instance, Raspberry Pi)
|
||||
|
|
|
|||
Loading…
Reference in a new issue