RKrahl / archive-tools

Tools for managing archives
Apache License 2.0
1 stars 2 forks source link

The basedir keyword argument to Archive() should be optional when creating an archive #8

Closed RKrahl closed 5 years ago

RKrahl commented 5 years ago

When creating an archive, the basedir keyword argument to Archive() should be optional. If omitted, suitable default depending on path and paths should be chosen. But if the argument is omitted, a rather incomprehensible TypeError is raised:

>>> archive = Archive("archive.tar", mode="x:", paths=["base"])
Traceback (most recent call last):
  ...
TypeError: argument should be a path or str object, not <class 'NoneType'>

Strictly speaking, this is not an error, since in the lack of any documentation, it is not documented that this argument is optional in this case. Nevertheless, this behavior was not intended.