fix ImportError
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 15 Mar 2012 18:34:31 +0000 (14:34 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 15 Mar 2012 18:34:31 +0000 (14:34 -0400)
sfa/openstack/osaggregate.py

index 1433646..013686c 100644 (file)
@@ -126,10 +126,10 @@ class OSAggregate:
         Create the slice if it doesn't alredy exist. Create user
         accounts that don't already exist   
         """
         Create the slice if it doesn't alredy exist. Create user
         accounts that don't already exist   
         """
-        import nova.exception.ProjectNotFound
+        from nova.exception import ProjectNotFound
         try:
             slice = self.driver.shell.auth_manager.get_project(slicename)
         try:
             slice = self.driver.shell.auth_manager.get_project(slicename)
-        except nova.exception.ProjectNotFound:
+        except ProjectNotFound:
             # assume that the first user is the project manager
             proj_manager = Xrn(users[0]['urn']).get_leaf() 
             self.driver.shell.auth_manager.create_project(slicename, proj_manager)
             # assume that the first user is the project manager
             proj_manager = Xrn(users[0]['urn']).get_leaf() 
             self.driver.shell.auth_manager.create_project(slicename, proj_manager)