fix Path.read
This commit is contained in:
parent
65a513916b
commit
5b81b1a339
|
@ -120,8 +120,8 @@ class Path(str):
|
||||||
|
|
||||||
|
|
||||||
def read(self, byte=False):
|
def read(self, byte=False):
|
||||||
fd = open(self)
|
fd = open(self, 'rb' if byte else 'r')
|
||||||
data = fd.read('rb' if byte else 'r')
|
data = fd.read()
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in a new issue