We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 112eea1 commit 5e66ad4Copy full SHA for 5e66ad4
vm/Lib/python_builtins/_io.py
@@ -7,6 +7,8 @@ def __init__(self, module):
7
self.__module = module
8
def __getattr__(self, attr):
9
raise RuntimeError(f"the {self.__module!r} module isn't available")
10
+ def __bool__(self):
11
+ return False
12
13
import sys
14
try:
@@ -39,7 +41,7 @@ def __getattr__(self, attr):
39
41
SEEK_END = 2
40
42
43
valid_seek_flags = {0, 1, 2} # Hardwired values
-if hasattr(os, 'SEEK_HOLE') :
44
+if os and hasattr(os, 'SEEK_HOLE') :
45
valid_seek_flags.add(os.SEEK_HOLE)
46
valid_seek_flags.add(os.SEEK_DATA)
47
0 commit comments