diff options
Diffstat (limited to 'base')
| -rw-r--r-- | base/util.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/base/util.py b/base/util.py index 5f71534..5193bcd 100644 --- a/base/util.py +++ b/base/util.py @@ -108,5 +108,9 @@ def flatten(l): _flatten(acc, l) return acc +def base_dir(tarball): + ti = tarball.next() + return ti.name.split('/')[0] + __all__ = ['pwd', 'copy', 'with_sudo', 'with_su', 'symlink', 'move', - 'log_file', 'one', 'remove_all', 'flatten'] + 'log_file', 'one', 'remove_all', 'flatten', 'base_dir'] |
