repositories: skip paths that cannot be chdir'ed into

(most probably because they are files, not directories)
This commit is contained in:
Frédéric Péters 2019-10-30 09:56:09 +01:00
parent d45e1457f6
commit c2ad39e4bd
1 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,10 @@ class Command(BaseCommand):
basedir = os.getcwd()
for repository in sorted(options.get('repository')):
os.chdir(basedir)
os.chdir(repository)
try:
os.chdir(repository)
except OSError:
continue
module = os.path.basename(repository).replace('.git', '')
print module
try: