diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-12-01 20:18:01 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-12-01 20:18:01 +0300 |
commit | 77d81aa4a3747b7dfbb17e43b16e1a514550c60c (patch) | |
tree | 0679778b3a5b46cb96d7c57485c847b83cc78bbf /debian/patches/argparse-no-shutil.diff | |
parent | c089c4500b0b78acf03ee5405ad250a84b0dfa66 (diff) | |
download | python3.8-debian.tar.gz |
Import python3.8 (3.8.0-5)debian/3.8.0-5debian
Diffstat (limited to 'debian/patches/argparse-no-shutil.diff')
-rw-r--r-- | debian/patches/argparse-no-shutil.diff | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/argparse-no-shutil.diff b/debian/patches/argparse-no-shutil.diff new file mode 100644 index 0000000..4234ad5 --- /dev/null +++ b/debian/patches/argparse-no-shutil.diff @@ -0,0 +1,25 @@ +--- a/Lib/argparse.py ++++ b/Lib/argparse.py +@@ -86,7 +86,6 @@ __all__ = [ + + import os as _os + import re as _re +-import shutil as _shutil + import sys as _sys + + try: +@@ -175,8 +174,12 @@ class HelpFormatter(object): + + # default setting for width + if width is None: +- width = _shutil.get_terminal_size().columns +- width -= 2 ++ try: ++ import shutil as _shutil ++ width = _shutil.get_terminal_size().columns ++ width -= 2 ++ except ImportError: ++ width = 70 + + self._prog = prog + self._indent_increment = indent_increment |