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

[PATCH v2.5/6] tools/pygrub: Fix expression before it's copied elsewhere


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 22 Nov 2023 20:07:02 +0000
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Anthony PERARD" <anthony.perard@xxxxxxxxxx>, Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
  • Delivery-date: Wed, 22 Nov 2023 20:07:51 +0000
  • Ironport-data: A9a23:+MhQaayMRycxq8aMCbV6t+eKxyrEfRIJ4+MujC+fZmUNrF6WrkVVy WoYCjqFPvzbZzH9Kd91adiy8EtQ7MKDyoM3GgRvriAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjPzOHvykTrecZkidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8E8HUMja4mtC5QVnP6oT5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KUFq3 9Y4ciATVTOoqOmbxKq6T8dsnP12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyPVKfO3WjOX9OYH46tM6uimPybHtzr1WNqLBsy2PS0BZwwP7mN9+9ltmiHJ8FxBnF+ TKXl4j/KkkwO9/Y6hbZyX6TiO3MnnPddtI4D4Tto5aGh3XMnzdOWXX6T2CTsfS/z0KzRd9bA 0gV4TY167g/8lSxSdvwVAH+p2SL1jYDX/JAHut87xuCopc4+C7AWDJCFGQYLoV75YlpHVTGy 2NlgfvJIRZFkOeFV0m+3ZifgDeqOC07LXU7MHpsoRQ+3zXznG0ipkuQFo49Tv7k0YadJN3m/ 9ydQMEDa1QvYS0jjfzTEajv2W7Em3QwZlddCv/rdmyk9BhlQ4Wuepal71PWhd4Zc97BEAbe7 ClfxJbBhAzrMX1rvHbWKAnqNOj5j8tpzRWG2QI/d3Xf32jFF4GfkXB4v2gleRYB3jcscj71e k7D0T69F7cKVEZGmZRfOtrrY+xzlPiIKDgQfqyMBja4SsQrJVDvEeAHTRL44l0BZ2B9wPhvY sjDIJbE4LRzIf0P8Qdajtw1idcDrh3SD0uILXwn53xLCYajWUM=
  • Ironport-hdrordr: A9a23:n6UdOKrMO/QG+UKsSx6eOREaV5oTeYIsimQD101hICG8cqSj+f xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Wei Liu <wl@xxxxxxx>
CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
CC: 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 327cf51774fc..2c06684d6532 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))
-- 
2.30.2




 


Rackspace

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