repositories: chdir to correct directory in case of error

This commit is contained in:
Frédéric Péters 2019-10-30 09:34:14 +01:00
parent f662661c4f
commit 449c4ee6d4
1 changed files with 2 additions and 0 deletions

View File

@ -32,7 +32,9 @@ class Command(BaseCommand):
def handle(self, *args, **options):
t0 = time.time()
basedir = os.getcwd()
for repository in sorted(options.get('repository')):
os.chdir(basedir)
os.chdir(repository)
module = os.path.basename(repository).replace('.git', '')
print module