Fix exceptions thrown by setup.py build_man

While doing some doc updates I needed a way to test them - to build
the documentation and inspect the output. I ran into an issue:
running python setup.py build_man was throwing exceptions:

1. The import-tar parser had a None description causing:

    File "/home/user/borg/setup_docs.py", line 451, in write_heading
      write(char * len(header))
    TypeError: object of type 'NoneType' has no len()

2. There was no docs/usage/import-tar.rst causing an exception too
This commit is contained in:
Andrey Bienkowski 2021-12-10 10:51:26 +03:00
parent dcb1aef5e0
commit 37e1ae4735
2 changed files with 2 additions and 0 deletions

View file

@ -0,0 +1 @@
.. include:: import-tar.rst.inc

View file

@ -1656,6 +1656,7 @@ class Archiver:
@with_repository(cache=True, exclusive=True, compatibility=(Manifest.Operation.WRITE,))
def do_import_tar(self, args, repository, manifest, key, cache):
"""Create a backup archive from a tarball"""
self.output_filter = args.output_filter
self.output_list = args.output_list