diff options
author | Tim Harder <radhermit@gmail.com> | 2015-11-26 20:05:06 -0500 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2015-11-26 20:06:25 -0500 |
commit | 5ad33963fae0902d39d4e82af0bd99f137c3cb28 (patch) | |
tree | bc87eca26447d1e6b9530ff8dc6aa0c4c5f8be4f | |
parent | pinspect profile: internalize argparse profile type and revert name (diff) | |
download | pkgcore-5ad33963fae0902d39d4e82af0bd99f137c3cb28.tar.gz pkgcore-5ad33963fae0902d39d4e82af0bd99f137c3cb28.tar.bz2 pkgcore-5ad33963fae0902d39d4e82af0bd99f137c3cb28.zip |
pinspect profile: check for invalid profile paths
-rw-r--r-- | pkgcore/ebuild/inspect_profile.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgcore/ebuild/inspect_profile.py b/pkgcore/ebuild/inspect_profile.py index 70beaecf..b1f5d7f9 100644 --- a/pkgcore/ebuild/inspect_profile.py +++ b/pkgcore/ebuild/inspect_profile.py @@ -23,7 +23,11 @@ class _base(commandline.ArgparseCommand): @staticmethod def profile(path): - return profiles.ProfileStack(commandline.existent_path(path)) + """Profile stack type for argparse""" + stack = profiles.ProfileStack(commandline.existent_path(path)) + if stack.node.repoconfig is None: + raise ValueError('invalid profile path') + return stack def bind_to_parser(self, parser): commandline.ArgparseCommand.bind_to_parser(self, parser) |