Skip to content

Commit

Permalink
Use app.Run() over RunWithArguments().
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCummins committed Jan 8, 2020
1 parent e3996ad commit 2513ff4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gpu/libcecl/libcecl_rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,8 @@ def _EnumerateFiles():
return (path for path in _EnumerateFiles() if FileShouldBeRewritten(path))


def main(argv):
def main():
"""Main entry point."""
if len(argv) > 1:
raise app.UsageError("Unknown arguments: '{}'.".format(" ".join(argv[1:])))

for path in FLAGS.opencl_rewrite_paths:
for path in GetFilesToRewriteFromPath(pathlib.Path(path)):
app.Log(1, "%s", path)
Expand All @@ -128,4 +125,4 @@ def main(argv):


if __name__ == "__main__":
app.RunWithArgs(main)
app.Run(main)

0 comments on commit 2513ff4

Please sign in to comment.