[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] tools/pygrub: Fix expression before it's copied elsewhere



commit 2d63785a8ae0a19ceded010367df675d618ea340
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Wed Nov 22 20:02:17 2023 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Nov 23 17:21:01 2023 +0000

    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@xxxxxxxxxx>
    Reviewed-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
---
 tools/pygrub/src/pygrub | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index 327cf51774..2c06684d65 100755
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -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))
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.