diff options
Diffstat (limited to 'cython/plist.pyx')
| -rw-r--r-- | cython/plist.pyx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cython/plist.pyx b/cython/plist.pyx index 3c6389c..d4f8d68 100644 --- a/cython/plist.pyx +++ b/cython/plist.pyx | |||
| @@ -863,6 +863,8 @@ cpdef object load(fp, fmt=None, use_builtin_types=True, dict_type=dict): | |||
| 863 | is_binary = fp.read(6) == 'bplist' | 863 | is_binary = fp.read(6) == 'bplist' |
| 864 | fp.seek(0) | 864 | fp.seek(0) |
| 865 | 865 | ||
| 866 | cdef object cb = None | ||
| 867 | |||
| 866 | if not fmt: | 868 | if not fmt: |
| 867 | if is_binary: | 869 | if is_binary: |
| 868 | if 'b' not in fp.mode: | 870 | if 'b' not in fp.mode: |
| @@ -888,6 +890,8 @@ cpdef object load(fp, fmt=None, use_builtin_types=True, dict_type=dict): | |||
| 888 | cpdef object loads(data, fmt=None, use_builtin_types=True, dict_type=dict): | 890 | cpdef object loads(data, fmt=None, use_builtin_types=True, dict_type=dict): |
| 889 | is_binary = data[0:6] == 'bplist' | 891 | is_binary = data[0:6] == 'bplist' |
| 890 | 892 | ||
| 893 | cdef object cb = None | ||
| 894 | |||
| 891 | if fmt is not None: | 895 | if fmt is not None: |
| 892 | if fmt not in (FMT_XML, FMT_BINARY): | 896 | if fmt not in (FMT_XML, FMT_BINARY): |
| 893 | raise ValueError('Format must be constant FMT_XML or FMT_BINARY') | 897 | raise ValueError('Format must be constant FMT_XML or FMT_BINARY') |
