From d19d1d2107a8e100514de2dcbf127c73085e28d1 Mon Sep 17 00:00:00 2001 From: yaderv Date: Tue, 22 Feb 2011 17:54:00 +0000 Subject: unmark option --- (limited to 'archivo.py') diff --git a/archivo.py b/archivo.py index 467b52b..bd0b5be 100644 --- a/archivo.py +++ b/archivo.py @@ -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 -- cgit v0.9.1