aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2015-11-26 19:45:19 -0500
committerTim Harder <radhermit@gmail.com>2015-11-26 20:06:25 -0500
commitb3e4f79ccd82b849927ceb4727b6159dbc66c1ac (patch)
tree7e24db2bb197d10477a172b25f5a790ee0a381e6
parentpinspect profile: fix multi-profile output (diff)
downloadpkgcore-b3e4f79ccd82b849927ceb4727b6159dbc66c1ac.tar.gz
pkgcore-b3e4f79ccd82b849927ceb4727b6159dbc66c1ac.tar.bz2
pkgcore-b3e4f79ccd82b849927ceb4727b6159dbc66c1ac.zip
pinspect profile: internalize argparse profile type and revert name
So that argparse error output uses the word 'profile' which makes more sense to the user for invalid input.
-rw-r--r--pkgcore/ebuild/inspect_profile.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgcore/ebuild/inspect_profile.py b/pkgcore/ebuild/inspect_profile.py
index 098cb623..70beaecf 100644
--- a/pkgcore/ebuild/inspect_profile.py
+++ b/pkgcore/ebuild/inspect_profile.py
@@ -19,15 +19,15 @@ commands = []
# global known flags, etc
-def profile_stack(path):
- return profiles.ProfileStack(commandline.existent_path(path))
-
-
class _base(commandline.ArgparseCommand):
+ @staticmethod
+ def profile(path):
+ return profiles.ProfileStack(commandline.existent_path(path))
+
def bind_to_parser(self, parser):
commandline.ArgparseCommand.bind_to_parser(self, parser)
- parser.add_argument("profile", help="path to the profile to inspect", type=profile_stack)
+ parser.add_argument("profile", help="path to the profile to inspect", type=self.profile)
name = self.__class__.__name__
kwds = {('_%s_suppress' % name): commandline.DelayedDefault.wipe(('domain'), 50)}
parser.set_defaults(**kwds)