Skip to content

Commit 3479f53

Browse files
.
1 parent 7f2383e commit 3479f53

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

structio.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,7 @@ def find(self, b):
7575
return self.getvalue().find(b, self.tell())
7676

7777
def index(self, b):
78-
location = self.find(b)
79-
80-
if location == -1:
81-
raise ValueError('{} not found'.format(b))
82-
83-
return location
78+
return self.getvalue().index(b, self.tell())
8479

8580
def read_bool(self):
8681
return self.read(1) != b'\x00'

0 commit comments

Comments
 (0)