summaryrefslogtreecommitdiffstats
path: root/obmc/utils
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-09-19 10:34:23 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2016-09-20 21:31:31 -0400
commitbf72047d9bbd4d0efe8ef55134c3bc4de8ecea9f (patch)
treeaca41d3858809d28ad94b4203177a5fba1562c30 /obmc/utils
parent25af4ba816330a24b83d2436f2008991b25f55e4 (diff)
downloadpyphosphor-bf72047d9bbd4d0efe8ef55134c3bc4de8ecea9f.tar.gz
pyphosphor-bf72047d9bbd4d0efe8ef55134c3bc4de8ecea9f.zip
utils: match parents
Match parents like '/org' in addition to '/org/openbmc/foo' when testing with org_dot_openbmc_match. Change-Id: I707f1de0367bfad0de4afa4436b10203c0d7f852 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'obmc/utils')
-rw-r--r--obmc/utils/misc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/obmc/utils/misc.py b/obmc/utils/misc.py
index d556dfd..01ecec1 100644
--- a/obmc/utils/misc.py
+++ b/obmc/utils/misc.py
@@ -24,8 +24,9 @@ def org_dot_openbmc_match_strings(sep='.'):
def org_dot_openbmc_match(name, sep='.'):
+ names = org_dot_openbmc_match_strings(sep)
return any(
- [x in name for x in org_dot_openbmc_match_strings(sep)])
+ [x in name or name in x for x in names])
class ListMatch(object):
OpenPOWER on IntegriCloud