[CalendarServer-changes] [14509] CalendarServer/trunk/txdav/base/datastore/subpostgres.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 5 10:51:40 PST 2015


Revision: 14509
          http://trac.calendarserver.org//changeset/14509
Author:   wsanchez at apple.com
Date:     2015-03-05 10:51:40 -0800 (Thu, 05 Mar 2015)
Log Message:
-----------
Get rid of executeSQL variable

Modified Paths:
--------------
    CalendarServer/trunk/txdav/base/datastore/subpostgres.py

Modified: CalendarServer/trunk/txdav/base/datastore/subpostgres.py
===================================================================
--- CalendarServer/trunk/txdav/base/datastore/subpostgres.py	2015-03-05 18:27:14 UTC (rev 14508)
+++ CalendarServer/trunk/txdav/base/datastore/subpostgres.py	2015-03-05 18:51:40 UTC (rev 14509)
@@ -411,17 +411,16 @@
             )
         except:
             # database already exists
-            executeSQL = False
+            sqlToExecute = None
         else:
             # database does not yet exist; if dump file exists, execute it,
             # otherwise execute schema
-            executeSQL = True
             sqlToExecute = self.schema
 
         createDatabaseCursor.close()
         createDatabaseConn.close()
 
-        if executeSQL:
+        if sqlToExecute is not None:
             connection = self.produceConnection()
             cursor = connection.cursor()
             cursor.execute(sqlToExecute)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150305/7dc73319/attachment.html>


More information about the calendarserver-changes mailing list