28:5933250813a3 | 29:db6ca177c6c4 |
---|---|
5 | 5 |
6 class BadLdrawLine(Exception): | 6 class BadLdrawLine(Exception): |
7 pass | 7 pass |
8 | 8 |
9 def parse_ldraw_code(line): | 9 def parse_ldraw_code(line): |
10 if isinstance(line, bytes): | |
11 line = line.decode() | |
10 line = line.strip() | 12 line = line.strip() |
11 if not line: | 13 if not line: |
12 return linetypes.EmptyLine() | 14 return linetypes.EmptyLine() |
13 elif line == '0': | 15 elif line == '0': |
14 return linetypes.Comment('') | 16 return linetypes.Comment('') |