Revision da961187 lib/utils.py
b/lib/utils.py | ||
---|---|---|
1785 | 1785 |
# we need to re-raise the exception |
1786 | 1786 |
raise |
1787 | 1787 |
|
1788 |
def IsNormAbsPath(path): |
|
1789 |
"""Check whether a path is absolute and also "normal". |
|
1790 |
|
|
1791 |
This avoids things like /dir/../../other/path to be valid. |
|
1792 |
|
|
1793 |
""" |
|
1794 |
return os.path.normpath(path) == path and os.path.isabs(path) |
|
1788 | 1795 |
|
1789 | 1796 |
def TailFile(fname, lines=20): |
1790 | 1797 |
"""Return the last lines from a file. |
Also available in: Unified diff