[mirrorbrain-commits] [opensuse-svn] r6359 - trunk/tools/download-redirector-v2/mirrordoctor

From: Novell Forge SVN <noreply_at_novell.com>
Date: Tue, 3 Feb 2009 15:21:07 -0700 (MST)
Author: poeml
Date: 2009-02-03 15:21:05 -0700 (Tue, 03 Feb 2009)
New Revision: 6359

Modified:
   trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py
Log:
mirrorbrain tool (mb delete):
 - when deleting a mirror, cascade delete all references first


Modified: trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py
===================================================================
--- trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py	2009-02-03 22:17:45 UTC (rev 6358)
+++ trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py	2009-02-03 22:21:05 UTC (rev 6359)
@@ -398,9 +398,9 @@
         if not identifier:
             sys.exit('need to specify identifier')
 
-        s = self.conn.Server.select(self.conn.Server.q.identifier == identifier)
-        for i in s:
-            print self.conn.Server.delete(i.id)
+        moribund = self.conn.Server.select(self.conn.Server.q.identifier == identifier)[0]
+        self.conn.FileServer.deleteBy(serverid = moribund.id)
+        self.conn.Server.delete(moribund.id)
 
 
     @cmdln.option('-C', '--comment', metavar='ARG',

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on 2009-02-03Z22:21:26

This archive was generated by hypermail 2.2.0 : 2009-07-10Z19:18:10 GMT