Selaa lähdekoodia

Fix filenames as unicode.

tags/v1.0^2
Ben Kurtovic 10 vuotta sitten
vanhempi
commit
54dfe93e8a
1 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. +4
    -3
      bitshift/crawler/indexer.py

+ 4
- 3
bitshift/crawler/indexer.py Näytä tiedosto

@@ -156,13 +156,14 @@ class GitIndexer(threading.Thread):
return

for filename, data in file_meta.iteritems():
name = ("%s: %s" % (repo.name, filename)).encode("utf8")
authors = [(author, None) for author in data["authors"]]
encoded_source = data["blob"].data_stream.read()
source = UnicodeDammit(encoded_source).unicode_markup
url = self._generate_file_url(filename, repo)
codelet = Codelet("%s: %s" % (repo.name, filename), source,
filename, None, authors, url, data["time_created"],
data["time_last_modified"], repo.rank)
codelet = Codelet(name, source, filename, None, authors, url,
data["time_created"], data["time_last_modified"],
repo.rank)
self._logger.debug("Indexing file: %s", codelet.name)
try:
parse(codelet)


Ladataan…
Peruuta
Tallenna