Skip to content

Commit bd5afb7

Browse files
committed
Fix errors with Python 3
1 parent 0077cae commit bd5afb7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Loaders/Parsers/Example Parser (RFNT).py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = "soopercool101 and Sammi Husky"
2-
__version__ = "2.0.0"
2+
__version__ = "3.0.0"
33

44
from BrawlCrate.API import *
55
from BrawlLib.SSBB.ResourceNodes import *
@@ -23,10 +23,10 @@ def TryParse(self, stream):
2323
if stream.Length < 4:
2424
return None
2525

26-
src = file(stream)
27-
src.seek(0,0)
26+
src = open(stream)
27+
src.seek(0)
2828
tag = ""
29-
tag = tag.join(struct.unpack('>4s', src.read(4)))
29+
tag = src.read(4).decode(encoding='utf-8', errors='ignore')
3030

3131
# If the tag matches, return an instance of our class
3232
if tag == "RFNT": #RFNT

0 commit comments

Comments
 (0)