[cpif] r267 - trunk/backend

svn at argo.es svn at argo.es
Thu Jul 12 09:46:30 CEST 2007


Author: jcea
Date: Thu Jul 12 09:46:29 2007
New Revision: 267

Log:
Limpieza de 'upgrading' base de datos

Modified:
   trunk/backend/upgrade.py

Modified: trunk/backend/upgrade.py
==============================================================================
--- trunk/backend/upgrade.py	(original)
+++ trunk/backend/upgrade.py	Thu Jul 12 09:46:29 2007
@@ -140,58 +140,18 @@
     conn.commit()
 
   if root["version del foro"]=="2007070402" :
-    import time
-    weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
-    monthname = [None,
-                 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
-                 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
-    year, month, day, hh, mm, ss, wd, y, z = time.gmtime()
-    ts = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (
-            weekdayname[wd],
-            day, monthname[month], year,
-            hh, mm, ss)
     print "Actualizando la base de datos: 2007070402 -> 2007071101"
     root["version del foro"]="2007071101"
-    for i in root["static"].values() :
-      for j in i.values() :
-        j[0]["last modified"]=ts
     conn.commit()
 
   if root["version del foro"]=="2007071101" :
-    import time
-    weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
-    monthname = [None,
-                 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
-                 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
-    year, month, day, hh, mm, ss, wd, y, z = time.gmtime()
-    ts = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (
-            weekdayname[wd],
-            day, monthname[month], year,
-            hh, mm, ss)
     print "Actualizando la base de datos: 2007071101 -> 2007071102"
     root["version del foro"]="2007071102"
-    for i in root["static"].values() :
-      for j in i.values() :
-        j[0]["last modified"]=ts
     conn.commit()
 
   if root["version del foro"]=="2007071102" :
-    import time
-    weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
-    monthname = [None,
-                 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
-                 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
-    year, month, day, hh, mm, ss, wd, y, z = time.gmtime()
-    ts = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (
-            weekdayname[wd],
-            day, monthname[month], year,
-            hh, mm, ss)
     print "Actualizando la base de datos: 2007071102 -> 2007071103"
     root["version del foro"]="2007071103"
-    for i in root["static"].values() :
-      for j,k in i.items() :
-        k[0]["last modified"]=ts
-        i[j]=k # Los items son diccionarios no persistentes, asi que hay que sobreescribir
     conn.commit()
 
   if root["version del foro"]=="2007071103" :



More information about the cpif mailing list