diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-03-26 17:38:26 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-03-26 17:38:26 +0000 |
commit | e39258bacc722ea9e7446c93b6443b8e1923e3a4 (patch) | |
tree | 18b046d4b68dfe093baa2c20ee3cc5f45f5745b4 | |
parent | 747189c07e5536151de3e656bc8fa5d23d8baf3c (diff) | |
download | sos-e39258bacc722ea9e7446c93b6443b8e1923e3a4.tar.gz |
Dead code removal: sos.plugins.common_prefix()
Unused. Delete.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 9ee0b614..4de8c0db 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -45,19 +45,6 @@ try: except ImportError: import simplejson as json -def common_prefix(l1, l2, common = None): - """Returns a tuple like the following: - ([common, elements, from l1, and l2], [[tails, from, l1], [tails, from, l2]]) - - >>> common_prefix(['usr','share','foo'], ['usr','share','bar']) - (['usr','share'], [['foo'], ['bar']]) - """ - if common is None: - common = [] - if len(l1) < 1 or len(l2) < 1 or l1[0] != l2[0]: - return (common, [l1, l2]) - return common_prefix(l1[1:], l2[1:], common+[l1[0]]) - def regex_findall(regex, fname): '''Return a list of all non overlapping matches in the string(s)''' try: |