From 2c3063ff7f3bacc02c1b35951c1fa7e24d36244b Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Sun, 26 Nov 2017 22:18:00 -0500 Subject: [PATCH] no-op for un-evaluatable items in globals This is for compatibility with other libraries that inject extra variables, like unit testing with pytest. --- Lib/ldap/schema/subentry.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/ldap/schema/subentry.py b/Lib/ldap/schema/subentry.py index 2a42b4c0..f5c9d2ec 100644 --- a/Lib/ldap/schema/subentry.py +++ b/Lib/ldap/schema/subentry.py @@ -12,7 +12,10 @@ SCHEMA_ATTR_MAPPING = {} for _name in dir(): - o = eval(_name) + try: + o = eval(_name) + except SyntaxError: + continue if hasattr(o,'schema_attribute'): SCHEMA_CLASS_MAPPING[o.schema_attribute] = o SCHEMA_ATTR_MAPPING[o] = o.schema_attribute pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy