aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2015-11-26 20:05:06 -0500
committerTim Harder <radhermit@gmail.com>2015-11-26 20:06:25 -0500
commit5ad33963fae0902d39d4e82af0bd99f137c3cb28 (patch)
treebc87eca26447d1e6b9530ff8dc6aa0c4c5f8be4f
parentpinspect profile: internalize argparse profile type and revert name (diff)
downloadpkgcore-5ad33963fae0902d39d4e82af0bd99f137c3cb28.tar.gz
pkgcore-5ad33963fae0902d39d4e82af0bd99f137c3cb28.tar.bz2
pkgcore-5ad33963fae0902d39d4e82af0bd99f137c3cb28.zip
pinspect profile: check for invalid profile paths
-rw-r--r--pkgcore/ebuild/inspect_profile.py6
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)