diff options
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 |