Suppress NamError
This commit is contained in:
@@ -28,6 +28,8 @@ class Dog:
|
||||
@staticmethod
|
||||
def disable():
|
||||
sys.stdout.write("Arf!\n")
|
||||
global NamError
|
||||
NamError = NameError
|
||||
|
||||
|
||||
class Chaos:
|
||||
@@ -46,7 +48,7 @@ sys.meta_path.insert(0, Chaos())
|
||||
import gc
|
||||
gc.disable()
|
||||
|
||||
with suppress(NameError):
|
||||
with suppress(NamError):
|
||||
heaven = a_place_on_earth() and god_is_a_girl()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user