tools/pygrub: Fix expression before it's copied elsewhere

This has an identical meaning, and is the more pythonic way of writing it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
This commit is contained in:
Andrew Cooper committed 2023-11-23 17:21:01 +00:00
1 parent de577641cf
commit 2d63785a8a
1 file changed
+1 -1
+1 -1
View File
@@ -88,7 +88,7 @@ def downgrade_rlimits():
# filesystem we set RLIMIT_FSIZE to a high bound, so that the file
# write permissions are bound.
fsize = LIMIT_FSIZE
if "PYGRUB_MAX_FILE_SIZE_MB" in os.environ.keys():
if "PYGRUB_MAX_FILE_SIZE_MB" in os.environ:
fsize = int(os.environ["PYGRUB_MAX_FILE_SIZE_MB"]) << 20
resource.setrlimit(resource.RLIMIT_FSIZE, (fsize, fsize))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.