diff options
Diffstat (limited to 'archivo.py')
-rw-r--r-- | archivo.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -119,6 +119,7 @@ def guardar_dato(indice, contenido, categoria, bolean, path): pickle.dump(dia, f) f.close() + def borrar_dato(indice, indice_lista, path): '''delete the selected content''' path = path + '/data/actividades.pkl' @@ -131,6 +132,11 @@ def borrar_dato(indice, indice_lista, path): f.seek(0) pickle.dump(dia, f) f.close() + + if len(dia[indice]): #return 1 if the date does not have data + return 0 + else: + return 1 def dict_meses(path, fecha=None): '''Create if not exists and return a data |