@@ -91,21 +91,15 @@ def get_default_ipc_path() -> Optional[str]:
91
91
ipc_path = os .path .expanduser (
92
92
os .path .join ("~" , "Library" , "Ethereum" , "geth.ipc" )
93
93
)
94
- if os .path .exists (ipc_path ):
95
- return ipc_path
96
- return None
94
+ return ipc_path
97
95
98
96
elif sys .platform .startswith ("linux" ) or sys .platform .startswith ("freebsd" ):
99
97
ipc_path = os .path .expanduser (os .path .join ("~" , ".ethereum" , "geth.ipc" ))
100
- if os .path .exists (ipc_path ):
101
- return ipc_path
102
- return None
98
+ return ipc_path
103
99
104
100
elif sys .platform == "win32" :
105
101
ipc_path = r"\\.\pipe\geth.ipc"
106
- if os .path .exists (ipc_path ):
107
- return ipc_path
108
- return None
102
+ return ipc_path
109
103
110
104
else :
111
105
raise ValueError (
@@ -117,27 +111,20 @@ def get_default_ipc_path() -> Optional[str]:
117
111
def get_dev_ipc_path () -> Optional [str ]:
118
112
if os .environ .get ("WEB3_PROVIDER_URI" , "" ):
119
113
ipc_path = os .environ .get ("WEB3_PROVIDER_URI" )
120
- if os .path .exists (ipc_path ):
121
- return ipc_path
122
- return None
114
+ return ipc_path
123
115
124
116
elif sys .platform == "darwin" :
125
117
tmpdir = os .environ .get ("TMPDIR" , "" )
126
118
ipc_path = os .path .expanduser (os .path .join (tmpdir , "geth.ipc" ))
127
- if os .path .exists (ipc_path ):
128
- return ipc_path
129
- return None
119
+ return ipc_path
130
120
131
121
elif sys .platform .startswith ("linux" ) or sys .platform .startswith ("freebsd" ):
132
122
ipc_path = os .path .expanduser (os .path .join ("/tmp" , "geth.ipc" ))
133
- if os .path .exists (ipc_path ):
134
- return ipc_path
135
- return None
123
+ return ipc_path
136
124
137
125
elif sys .platform == "win32" :
138
126
ipc_path = os .path .join ("\\ \\ " , "." , "pipe" , "geth.ipc" )
139
- if os .path .exists (ipc_path ):
140
- return ipc_path
127
+ return ipc_path
141
128
142
129
else :
143
130
raise ValueError (
0 commit comments