Index: fedd/federation/topdl.py
===================================================================
--- fedd/federation/topdl.py	(revision cf00ddd87fd21643c02fdfda7a36c095ff90fed0)
+++ fedd/federation/topdl.py	(revision f432e51a10c715eaf8e6ef378f4bab039e13b20d)
@@ -26,4 +26,12 @@
 	else: return [ a ]
 
+    @staticmethod
+    def init_string(s):
+	"""
+	Force a string coercion for everything but a None.
+	"""
+	if s is not None: return "%s" % s
+	else: return None
+
     def remove_attribute(self, key):
 	to_del = None
@@ -62,6 +70,6 @@
 class Attribute(base):
     def __init__(self, attribute, value):
-	self.attribute = "%s" % attribute
-	self.value = "%s" % value
+	self.attribute = self.init_string(attribute)
+	self.value = self.init_string(value)
 
     def clone(self):
@@ -74,5 +82,5 @@
     def __init__(self, rate, kind):
 	self.rate = float(rate)
-	self.kind = "%s" % kind
+	self.kind = self.init_string(kind)
 
     def clone(self):
@@ -85,5 +93,5 @@
     def __init__(self, time, kind):
 	self.time = float(time)
-	self.kind = "%s" % kind
+	self.kind = self.init_string(kind)
 
     def clone(self):
@@ -95,5 +103,5 @@
 class Substrate(base):
     def __init__(self, name, capacity=None, latency=None, attribute=[]):
-	self.name = "%s" % name
+	self.name = self.init_string(name)
 	self.capacity = self.init_class(Capacity, capacity)
 	self.latency = self.init_class(Latency, latency)
@@ -126,5 +134,5 @@
 class CPU(base):
     def __init__(self, type, attribute=[]):
-	self.type = "%s" % type
+	self.type = self.init_string(type)
 	self.attribute = [ self.init_class(Attribute, a) for a in \
 		self.make_list(attribute) ]
@@ -143,5 +151,5 @@
     def __init__(self, amount, persistence, attribute=[]):
 	self.amount = float(amount)
-	self.presistence = "%s" % persistence
+	self.presistence = self.init_string(persistence)
 	self.attribute = [ self.init_class(Attribute, a) \
 		for a in self.make_list(attribute) ]
@@ -160,8 +168,8 @@
     def __init__(self, name=None, version=None, distribution=None,
 	    distributionversion=None, attribute=[]):
-	self.name = "%s" % name
-	self.version = "%s" % version
-	self.distribution = "%s" % distribution
-	self.distributionversion = "%s" % distributionversion
+	self.name = self.init_string(name)
+	self.version = self.init_string(version)
+	self.distribution = self.init_string(distribution)
+	self.distributionversion = self.init_string(distributionversion)
 	self.attribute = [ self.init_class(Attribute, a) \
 		for a in self.make_list(attribute) ]
@@ -186,6 +194,6 @@
 class Software(base):
     def __init__(self, location, install=None, attribute=[]):
-	self.location = "%s" % location
-	self.install = "%s" % install
+	self.location = self.init_string(location)
+	self.install = self.init_string(install)
 	self.attribute = [ self.init_class(Attribute, a)\
 		for a in self.make_list(attribute) ]
@@ -205,5 +213,6 @@
     def __init__(self, substrate, name=None, capacity=None, latency=None,
 	    attribute=[], element=None):
-	self.name = "%s" % name
+	self.name = self.init_string(name)
+
 	self.substrate = self.make_list(substrate)
 	self.capacity = self.init_class(Capacity, capacity)
@@ -239,8 +248,8 @@
 	    kerberosUsername=None):
 	self.fedid=fedid_class(hexstr="%s" % fedid)
-	self.uuid = "%s" % uuid
-	self.uri = "%s" % uri
-	self.localname ="%s" %  localname
-	self.kerberosUsername = "%s" % kerberosUsername
+	self.uuid = self.init_string(uuid)
+	self.uri = self.init_string(uri)
+	self.localname =self.init_string( localname)
+	self.kerberosUsername = self.init_string(kerberosUsername)
 
     def clone(self):
@@ -263,5 +272,5 @@
 	    i.element = self
 
-	self.name = "%s" % name
+	self.name = self.init_string(name)
 	self.cpu = [ self.init_class(CPU, c)  for c in self.make_list(cpu) ]
 	self.os = [ self.init_class(OperatingSystem, c) \
@@ -308,6 +317,6 @@
 class Testbed(base):
     def __init__(self, uri, type, interface=[], attribute=[]):
-	self.uri = "%s" % uri
-	self.type = "%s" % type
+	self.uri = self.init_string(uri)
+	self.type = self.init_string(type)
 	self.interface = [ self.init_class(Interface, c) \
 		for c in self.make_list(interface) ]
@@ -333,6 +342,6 @@
     def __init__(self, id, type, uri, interface=[], attribute=[]):
 	self.id = self.init_class(ID, id)
-	self.type = "%s" % type
-	self.uri = "%s" % uri
+	self.type = self.init_string(type)
+	self.uri = self.init_string(uri)
 	self.interface = [ self.init_class(Interface, c) \
 		for c in self.make_list(interface) ]
