remove whitespace
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 23 Jun 2011 17:03:56 +0000 (13:03 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 23 Jun 2011 17:03:56 +0000 (13:03 -0400)
sfa/rspecs/sfa_rspec.py

index 3f85618..3b72dba 100755 (executable)
@@ -53,14 +53,18 @@ class SfaRSpec(RSpec):
             nodes = self.xml.xpath('//node/hostname/text()')
         else:
             nodes = self.xml.xpath('//network[@name="%s"]//node/hostname/text()' % network)
+
+        nodes = [node.strip() for node in nodes]
         return nodes
 
     def get_nodes_with_slivers(self, network = None):
         if network:
-            return self.xml.xpath('//network[@name="%s"]//node[sliver]/hostname/text()' % network)   
+            nodes =  self.xml.xpath('//network[@name="%s"]//node[sliver]/hostname/text()' % network)   
         else:
-            return self.xml.xpath('//node[sliver]/hostname/text()')
+            nodes = self.xml.xpath('//node[sliver]/hostname/text()')
 
+        nodes = [node.strip() for node in nodes]
+        return nodes     
     def get_nodes_without_slivers(self, network=None): 
         xpath_nodes_without_slivers = '//node[not(sliver)]/hostname/text()'
         xpath_nodes_without_slivers_in_network = '//network[@name="%s"]//node[not(sliver)]/hostname/text()'