diff options
author | Dylan Baker <[email protected]> | 2014-11-20 17:07:48 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-05-22 11:31:27 -0700 |
commit | 28ecdd6be7e6f58eabfc9aa0461fb8db7dd8133d (patch) | |
tree | 2115f50c76e98dae7b8b2a74977b219c43349c7f | |
parent | 622fee43c8aa339e6b642fc8a90c759dcf28c6e7 (diff) |
glapi: gl_procs.py: Fix a few low hanging style things
Shuts up analysis tools to make them return actual problems.
Signed-off-by: Dylan Baker <[email protected]>
Acked-by: Matt Turner <[email protected]>
-rw-r--r-- | src/mapi/glapi/gen/gl_procs.py | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/mapi/glapi/gen/gl_procs.py b/src/mapi/glapi/gen/gl_procs.py index b1fffc4ca07..d5ffb9286ef 100644 --- a/src/mapi/glapi/gen/gl_procs.py +++ b/src/mapi/glapi/gen/gl_procs.py @@ -25,9 +25,13 @@ # Authors: # Ian Romanick <[email protected]> +import sys +import getopt + import license -import gl_XML, glX_XML -import sys, getopt +import gl_XML +import glX_XML + class PrintGlProcs(gl_XML.gl_print_base): def __init__(self, es=False): @@ -39,7 +43,6 @@ class PrintGlProcs(gl_XML.gl_print_base): """Copyright (C) 1999-2001 Brian Paul All Rights Reserved. (C) Copyright IBM Corporation 2004, 2006""", "BRIAN PAUL, IBM") - def printRealHeader(self): print """ /* This file is only included by glapi.c and is used for @@ -166,16 +169,18 @@ def show_usage(): print "-c Enable compatibility with OpenGL ES." sys.exit(1) -if __name__ == '__main__': + +def main(): + """Main function.""" file_name = "gl_API.xml" try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:c") - except Exception,e: + args, _ = getopt.getopt(sys.argv[1:], "f:c") + except Exception: show_usage() es = False - for (arg,val) in args: + for arg, val in args: if arg == "-f": file_name = val elif arg == "-c": @@ -184,3 +189,7 @@ if __name__ == '__main__': api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) printer = PrintGlProcs(es) printer.Print(api) + + +if __name__ == '__main__': + main() |