Ticket #11577: trac_11577-delta-1to2.patch

File trac_11577-delta-1to2.patch, 694 bytes (added by jhpalmieri, 8 years ago)

for reference only: difference between old jhp patch and v2

  • sage/structure/sage_object.pyx

    diff --git a/sage/structure/sage_object.pyx b/sage/structure/sage_object.pyx
    a b def save(obj, filename=None, compress=Tr 
    837837    # Add '.sobj' if the filename currently has no extension
    838838    # and also if the object doesn't have its own save() method (#11577)
    839839    # since we otherwise assume below it is an image object:
    840     if os.path.splitext(filename)[1] == ''  or not hasattr(obj,"save"):
     840    if (os.path.splitext(filename)[1] == ''
     841        or (os.path.splitext(filename)[1] != '.sobj'
     842             and not hasattr(obj,"save"))):
    841843        filename += '.sobj'
    842844
    843845    if filename.endswith('.sobj'):