Index: src/sas/sascalc/realspace/VolumeCanvas.py
===================================================================
--- src/sas/sascalc/realspace/VolumeCanvas.py	(revision f3bf622b821c651bb6e946100b07e15cd59331fe)
+++ src/sas/sascalc/realspace/VolumeCanvas.py	(revision 6435594be830f5ce39be39bad902924f08910a97)
@@ -379,6 +379,6 @@
         # If a shape identifier was given, look the shape up
         # in the dictionary
-        if len(toks)>1:
-            if toks[0] in self.shapes.keys():
+        if len(toks):
+            if toks[0] in self.shapes:
                 # The shape was found, now look for the parameter
                 if toks[1] in self.shapes[toks[0]].params:
@@ -387,7 +387,7 @@
                     self._model_changed()
                 else:
-                    raise ValueError, "Could not find parameter %s" % name
+                    raise ValueError("Could not find parameter %s" % name)
             else:
-                raise ValueError, "Could not find shape %s" % toks[0]
+                raise ValueError("Could not find shape %s" % toks[0])
         
         else:
@@ -410,10 +410,8 @@
         if len(toks) == 1:
             try:
-                a = self.params[toks[0]]
+                value = self.params[toks[0]]
             except KeyError:
                 raise ValueError("VolumeCanvas.getParam: Could not find"
                                  " %s" % name)
-
-            value = self.params[toks[0]]
             if isinstance(value, ShapeDescriptor):
                 raise ValueError("VolumeCanvas.getParam: Cannot get parameter"
@@ -424,14 +422,10 @@
         elif len(toks) == 2:
             try:
-                a = self.shapes[toks[0]]
+                shapeinstance = self.shapes[toks[0]]
             except KeyError:
                 raise ValueError("VolumeCanvas.getParam: Could not find "
                                  "%s" % name)
 
-            shapeinstance = self.shapes[toks[0]]
-
-            try:
-                a = shapeinstance.params[toks[1]]
-            except KeyError:
+            if not toks[1] in shapeinstance.params:
                 raise ValueError("VolumeCanvas.getParam: Could not find "
                                  "%s" % name)
@@ -442,5 +436,5 @@
             raise ValueError("VolumeCanvas.getParam: Could not find %s" % name)
             
-    def getParamList(self, shapeid = None):
+    def getParamList(self, shapeid=None):
         """
 	       return a full list of all available parameters from 
@@ -455,18 +449,16 @@
         param_list = []
         if shapeid is None:
-            for key1 in self.params.keys():
+            for key1 in self.params:
                 #value1 = self.params[key1]
                 param_list.append(key1)
-            for key2 in self.shapes.keys():
+            for key2 in self.shapes:
                 value2 = self.shapes[key2]
                 header = key2 + '.'
-                for key3 in value2.params.keys():   
+                for key3 in value2.params:
                     fullname = header + key3                 
                     param_list.append(fullname)
      
         else:
-            try:
-                a = self.shapes[shapeid]
-            except KeyError:
+            if not shapeid in self.shapes:
                 raise ValueError("VolumeCanvas: getParamList: Could not find "
                                  "%s" % shapeid)
@@ -487,5 +479,5 @@
             @param shapeDesc: shape description
         """
-        #Create the object model
+        # Create the object model
         shapeDesc.create()
                     
@@ -602,5 +594,5 @@
         # type we recognize
         else:
-            raise ValueError, "run(q): bad type for q"
+            raise ValueError("run(q): bad type for q")
     
     def runXY(self, q = 0):
@@ -622,5 +614,5 @@
         # type we recognize
         else:
-            raise ValueError, "runXY(q): bad type for q"
+            raise ValueError("runXY(q): bad type for q")
     
     def _create_modelObject(self):
