use iteritems in loops on dicts
[sfa.git] / sfa / client / getNodes.py
index 4d34a43..67f9a28 100644 (file)
@@ -6,7 +6,7 @@ from optparse import OptionParser
 from pprint import pprint
 from types import StringTypes
 
-from sfa.util.rspec import Rspec
+from sfa.util.rspec import RSpec
 
 def create_parser():
     command = sys.argv[0]
@@ -32,7 +32,7 @@ def print_dict(rdict, options, counter=1):
     
     if not isinstance(rdict, dict):
         raise "%s not a dict" % rdict 
-    for (key, value) in rdict.items():
+    for (key, value) in rdict.iteritems():
         if isinstance(value, StringTypes):
             if (attributes and key in attributes) or not attributes:
                 print tab * counter + "%s: %s" % (key, value)
@@ -57,10 +57,10 @@ def main():
     parser = create_parser(); 
     (options, args) = parser.parse_args()
     if not options.infile:
-        print "Rspec file not specified"
+        print "RSpec file not specified"
         return 
         
-    rspec = Rspec()
+    rspec = RSpec()
     try:
         rspec.parseFile(options.infile)
     except: