[scodoc-devel] [SVN] Scolar : [1755] Fix: bug generating filenames when default was too short

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Ven 19 Jan 09:20:19 CET 2018


Une pièce jointe HTML a été nettoyée...
URL: https://listes.univ-paris13.fr/pipermail/scodoc-devel/attachments/20180119/9a42af77/attachment.htm 
-------------- section suivante --------------
Modified: branches/ScoDoc7/sco_utils.py
===================================================================
--- branches/ScoDoc7/sco_utils.py	2018-01-16 17:13:09 UTC (rev 1754)
+++ branches/ScoDoc7/sco_utils.py	2018-01-19 08:20:18 UTC (rev 1755)
@@ -439,7 +439,7 @@
     """
     sane = ''.join( [ c for c in filename if c in VALID_CARS_SET ] )
     if len(sane) < 2:
-        sane = time.time() + '-' + sane
+        sane = time.strftime('%Y-%m-%d-%H%M%S') + '-' + sane
     return sane
 
 def is_valid_filename(filename):


Plus d'informations sur la liste de diffusion scodoc-devel