Skip to content

Commit

Permalink
Arreglo valor por omisión 'horas-sueltas'
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcp committed Dec 3, 2015
1 parent 8024951 commit c609f31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion horas.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ def __init__(self, ruta_hs='~/.horas.json'):
self.ruta_hs = os.path.expanduser(ruta_hs)
self.formato_datetime = '%Y-%m-%d %H:%M:%S'

def inicio(self, nombre='horas-sueltas'):
def inicio(self, nombre):
hs = self._leer_hs()
self._cerrar_registros(hs)
nombre = nombre or 'horas-sueltas'
hs.setdefault(nombre, []).append({
'inicio': datetime.utcnow().strftime(self.formato_datetime)
})
Expand Down

0 comments on commit c609f31

Please sign in to comment.