bunch of cleanups & fixes all over the place
[sfa.git] / sfa / client / sfi.py
index f29a296..aa13830 100755 (executable)
@@ -11,11 +11,11 @@ from optparse import OptionParser
 
 from sfa.trust.certificate import Keypair, Certificate
 from sfa.trust.credential import Credential
-from sfa.trust.gid import create_uuid
 
-from sfa.util.newgeniclient import GeniClient
+from sfa.util.geniclient import GeniClient
 from sfa.util.record import *
 from sfa.util.rspec import Rspec
+from sfa.util.xmlrpcprotocol import ServerException
 
 # xxx todo xxx auto-load ~/.sfi/sfi_config
 
@@ -589,8 +589,7 @@ def create(opts, args):
    slice_hrn = args[0]
    slice_cred = get_slice_cred(slice_hrn)
    rspec_file = get_rspec_file(args[1])
-   with open(rspec_file) as f:
-      rspec = f.read()
+   rspec=open(rspec_file).read()
    return slicemgr.create_slice(slice_cred, slice_hrn, rspec)
 
 # delete named slice