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

From: Novell Forge SVN <noreply_at_novell.com>
Date: Thu, 12 Feb 2009 19:46:17 -0700 (MST)
Author: poeml
Date: 2009-02-12 19:46:14 -0700 (Thu, 12 Feb 2009)
New Revision: 6449

Modified:
   trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py
Log:
mb tool, edit mode: fix a case where a boolean value is edited, and make it editable both as True/False and 0/1. Setting such a value to False or 0 was not working.

Modified: trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py
===================================================================
--- trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py	2009-02-13 01:49:24 UTC (rev 6448)
+++ trunk/tools/download-redirector-v2/mirrordoctor/mirrordoctor.py	2009-02-13 02:46:14 UTC (rev 6449)
@@ -324,7 +324,9 @@
                     print """changing %s from '%s' to '%s'""" \
                             % (i, old_dict[i], new_dict[i])
                     a = new_dict[i]
-                    if type(getattr(mirror, i)) in [type(1L), type(1)]:
+                    if a == 'False': a = False
+                    if a == 'True': a = True
+                    if type(getattr(mirror, i)) in [type(1L), type(1), bool]:
                         a = int(a)
                     setattr(mirror, i, a)
 

_______________________________________________
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-13Z02:47:14

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