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