diff --git a/charmcraft/commands/store/__init__.py b/charmcraft/commands/store/__init__.py index dba219b88..f02c4313a 100644 --- a/charmcraft/commands/store/__init__.py +++ b/charmcraft/commands/store/__init__.py @@ -19,7 +19,6 @@ import ast import hashlib import logging -import os import pathlib import string import textwrap @@ -287,9 +286,9 @@ class UploadCommand(BaseCommand): overview = textwrap.dedent(""" Upload a charm or bundle to Charmhub. - Push a charm or bundle to Charmhub where it will be verified for - conformance to the packaging standard. This command will finish - successfully once the package is approved by Charmhub. + Push a charm or bundle to Charmhub where it will be verified. + This command will finish successfully once the package is + approved by Charmhub. In the event of a failure in the verification process, charmcraft will report details of the failure, otherwise it will give you the diff --git a/charmcraft/utils.py b/charmcraft/utils.py index 1207530d2..7106a1b18 100644 --- a/charmcraft/utils.py +++ b/charmcraft/utils.py @@ -70,10 +70,9 @@ def get_templates_environment(templates_dir): def useful_filepath(filepath): - """Convert the string to Path and verify that is a useful file path. + """Return a valid Path with user name expansion for filepath. - It checks that the file exists and it's readable, and that it's actually a - file. Also the `~` is expanded to the user's home. + CommandError is raised if filepath is not a valid file or is not readable. """ filepath = pathlib.Path(filepath).expanduser() if not os.access(str(filepath), os.R_OK): # access doesn't support pathlib in 3.5