Remove doubled instantiation of the zipfile (#16609)

pull/16623/head
Toshio Kuratomi 8 years ago committed by GitHub
parent 0f5f5fffee
commit d38cc1e0a1

@ -290,8 +290,8 @@ if __name__ == '__main__':
# may load the system-wide install of ansible rather than the one in
# the module. sitecustomize is the only way to override that setting.
z = zipfile.ZipFile(zipped_mod, mode='a')
# py3: zipped_mod will be text, py2: it's bytes. Need bytes at the end
z = zipfile.ZipFile(zipped_mod, mode='a')
sitecustomize = u'import sys\\nsys.path.insert(0,"%%s")\\n' %% zipped_mod
sitecustomize = sitecustomize.encode('utf-8')
z.writestr('sitecustomize.py', sitecustomize)

Loading…
Cancel
Save