fix rspec formatting
[sfa.git] / sfa / rspecs / pg_rspec.py
index c321d25..a151b0a 100755 (executable)
@@ -9,10 +9,7 @@ from sfa.util.config import Config
 
 class PGRSpec(RSpec):
     header = '<?xml version="1.0"?>\n'
-    template = """
-<rspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.protogeni.net/resources/rspec/0.2" xsi:schemaLocation="http://www.protogeni.net/resources/rspec/0.2 http://www.protogeni.net/resources/rspec/0.2/ad.xsd">\n
-</rspec>
-"""
+    template = """<rspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.protogeni.net/resources/rspec/0.2" xsi:schemaLocation="http://www.protogeni.net/resources/rspec/0.2 http://www.protogeni.net/resources/rspec/0.2/ad.xsd"></rspec>"""
     namespaces = {'rspecv2':'http://www.protogeni.net/resources/rspec/0.2',
                   'xsi': 'http://www.w3.org/2001/XMLSchema-instance'
                  }
@@ -71,9 +68,9 @@ class PGRSpec(RSpec):
             location_tag = etree.SubElement(node_tag, 'location', location="US")
             if 'site' in node:
                 if 'longitude' in node['site']:
-                    location_tag.set('longitude', node['site']['longitude'])
+                    location_tag.set('longitude', str(node['site']['longitude']))
                 if 'latitude' in node['site']:
-                    location_tag.set('latitude', node['site']['latitude'])
+                    location_tag.set('latitude', str(node['site']['latitude']))
             #if 'interfaces' in node: