glapy: gl_genexec.py: use a main function
authorDylan Baker <baker.dylan.c@gmail.com>
Wed, 20 May 2015 18:49:40 +0000 (11:49 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 22 May 2015 18:31:28 +0000 (11:31 -0700)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
src/mapi/glapi/gen/gl_genexec.py

index dbaafa71fd7875fb892a7d2e21fdaef0686ebf03..0d58a8a2914be64926721c29d8a0fb1e309e9a62 100644 (file)
@@ -218,8 +218,13 @@ def _parser():
     return parser.parse_args()
 
 
-if __name__ == '__main__':
+def main():
+    """Main function."""
     args = _parser()
     printer = PrintCode()
     api = gl_XML.parse_GL_API(args.filename)
     printer.Print(api)
+
+
+if __name__ == '__main__':
+    main()