Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/archivo.py
diff options
context:
space:
mode:
Diffstat (limited to 'archivo.py')
-rw-r--r--archivo.py6
1 files changed, 6 insertions, 0 deletions
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