image-info: ensure target is an absolute path
Specify the type for the 'target' command line argument to be an absolute path. Also add a metavar description for the option.
This commit is contained in:
parent
ea9b1fa333
commit
9c0fdd9981
1 changed files with 3 additions and 1 deletions
|
|
@ -398,7 +398,9 @@ def analyse_tarball(path):
|
|||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Inspect an image")
|
||||
parser.add_argument("target", help="The file or directory to analyse")
|
||||
parser.add_argument("target", metavar="TARGET",
|
||||
help="The file or directory to analyse",
|
||||
type=os.path.abspath)
|
||||
|
||||
args = parser.parse_args()
|
||||
target = args.target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue