~siborgium/src-tree

7622e81c94275ecc6d7f394c712578a84c5caa5c — Sergey Smirnykh 1 year, 3 months ago 9b4d424
check if repo dir exists and is a dir
1 files changed, 2 insertions(+), 2 deletions(-)

M src-tree
M src-tree => src-tree +2 -2
@@ 91,8 91,8 @@ class SrcTree(object):
        for repo in config['repositories']:
            name = repo['name'] if 'name' in repo else repo_name_from_url(repo['url'])
            dir = root / name / args.builddir
            print(name)
            print('{} => {}', repo['url'], dir)
            if not dir.parent.is_dir():
                raise Exception(f'{dir.parent} is not a directory')

            if dir.is_symlink():
                dir.unlink(missing_ok=True)