Explorar el Código

Fix data reversal.

tags/v0.1^2
Ben Kurtovic hace 12 años
padre
commit
2f86fe5b07
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      bot/tasks/afc_history.py

+ 2
- 1
bot/tasks/afc_history.py Ver fichero

@@ -86,8 +86,9 @@ class Task(BaseTask):
date = category.title().split("/")[-1] date = category.title().split("/")[-1]
data[date] = self.get_date_counts(date) data[date] = self.get_date_counts(date)


data = OrderedDict(reversed(data.items())) # Oldest to most recent
self.generate_chart(data)
dest = expanduser(self.destination) dest = expanduser(self.destination)
self.generate_chart(reversed(data))
plt.savefig(dest) plt.savefig(dest)
self.logger.info("Chart saved to {0}".format(dest)) self.logger.info("Chart saved to {0}".format(dest))




Cargando…
Cancelar
Guardar