mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
Wrapped tarfile for py26
This commit is contained in:
parent
88e472eb08
commit
50ce91b769
1 changed files with 3 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
"""Let's Encrypt Apache configuration submission script"""
|
||||
import argparse
|
||||
import contextlib
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
|
@ -286,7 +287,8 @@ def main():
|
|||
make_and_verify_selection(args.server_root, tempdir)
|
||||
|
||||
tarpath = os.path.join(tempdir, "config.tar.gz")
|
||||
with tarfile.open(tarpath, mode="w:gz") as tar:
|
||||
# contextlib.closing used for py26 support
|
||||
with contextlib.closing(tarfile.open(tarpath, mode="w:gz")) as tar:
|
||||
tar.add(tempdir, arcname=".")
|
||||
|
||||
# Submit tarpath
|
||||
|
|
|
|||
Loading…
Reference in a new issue