commit 68508c6c7a0fe5d6c3228808a94013ba21278302
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Thu Oct 18 16:16:27 2012 +0200
Logs: remove unused code
The exception class FindRootPathError is not used anywhere except in the
following function find_test_root(). This function however is not called
at all. I am removing both of these so that they don't confuse anyone.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Common/Logs.py | 28 ----------------------------
1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/Common/Logs.py b/Common/Logs.py
index ae5cfa8..41c1abf 100644
--- a/Common/Logs.py
+++ b/Common/Logs.py
@@ -22,34 +22,6 @@ def log_exc_traceback():
exception = traceback.format_exception(cmd_type, value, tb)
logging.debug(''.join(exception))
-class FindRootPathError(Exception):
- def __init__(self, path, rootFolder):
- Exception.__init__(self, path, rootFolder)
- self.path = path
- self.rootFolder = rootFolder
-
- def __str__(self):
- return ("Cannot find root folder '%s' in path '%s'" %
- (self.rootFolder, self.path))
-
-
-def find_test_root(path, rootFolder):
- """
- Find test root folder in path.
-
- @param path: Path.
- @param rootFolder: Name of test root folder.
- @return: Absolute path to test root folder.
- """
- sub = None
- path = os.path.abspath(path)
- _path = path
- while sub != rootFolder and sub != '':
- _path, sub = os.path.split(_path)
- if sub != rootFolder:
- raise FindRootPathError(path, rootFolder)
- return os.path.join(_path, sub)
-
class MultilineFormater(Formatter):
"""
Show replies by date