[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 7 of 9] libxl: IDL: bring command line handling in genwrap.py into one place



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1310646156 -3600
# Node ID 73832fb92268d5a975cfe5e2f2b2b44dd59cc9db
# Parent  df13bcff8d7ddedbce11f7e096d5756beb3f913b
libxl: IDL: bring command line handling in genwrap.py into one place.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r df13bcff8d7d -r 73832fb92268 tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py   Thu Jul 14 13:22:36 2011 +0100
+++ b/tools/libxl/gentypes.py   Thu Jul 14 13:22:36 2011 +0100
@@ -137,14 +137,14 @@ def libxl_C_enum_from_string(ty, str, e,
     
 
 if __name__ == '__main__':
-    if len(sys.argv) < 4:
+    if len(sys.argv) != 4:
         print >>sys.stderr, "Usage: gentypes.py <idl> <header> 
<implementation>"
         sys.exit(1)
 
-    idl = sys.argv[1]
+    (_, idl, header, impl) = sys.argv
+
     (_,types) = libxltypes.parse(idl)
                     
-    header = sys.argv[2]
     print "outputting libxl type definitions to %s" % header
 
     f = open(header, "w")
@@ -174,7 +174,6 @@ if __name__ == '__main__':
     f.write("""#endif /* __LIBXL_TYPES_H */\n""")
     f.close()
     
-    impl = sys.argv[3]
     print "outputting libxl type implementations to %s" % impl
 
     f = open(impl, "w")

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.