Explorar el Código

Untested fix #33.

Add:
    bitshift/crawler/indexer.py
        -Add conditional to remove the full path of a repository if the owner's
        directory contains only one sub-directory.
tags/v1.0^2
Severyn Kozak hace 10 años
padre
commit
fc8d478060
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. +6
    -1
      bitshift/crawler/indexer.py

+ 6
- 1
bitshift/crawler/indexer.py Ver fichero

@@ -121,7 +121,12 @@ class GitIndexer(threading.Thread):
self._logger.exception("Exception raised while indexing:")
finally:
if os.path.isdir("%s/%s" % (GIT_CLONE_DIR, repo.name)):
shutil.rmtree("%s/%s" % (GIT_CLONE_DIR, repo.name))
if len([obj for obj in os.listdir('.') if
os.path.isdir(obj)]) <= 1:
shutil.rmtree("%s/%s" % (
GIT_CLONE_DIR, repo.name.split("/")[0]))
else:
shutil.rmtree("%s/%s" % (GIT_CLONE_DIR, repo.name))

def _insert_repository_codelets(self, repo):
"""


Cargando…
Cancelar
Guardar