================ @@ -0,0 +1,22 @@ +import argparse +import os + +def get_file_size(file_path): + try: + return os.path.getsize(file_path) + except: + print(f"Unable to get file size of {file_path}") + return None ---------------- connieyzhu wrote:
Now that I look at it again, I think having an unhandled exception would be better. I didn't realize that my implementation doesn't actually return an error code, but I would think having the error code would be better for debugging. https://github.com/llvm/llvm-project/pull/105902 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits