Skip to content
Commits on Source (2)
  • Mattia Rizzolo's avatar
    Revert "Modified zip.py to handle ENOSPC" · 0761d330
    Mattia Rizzolo authored
    This commit isn't what the message says, and it breaks `black`
    
    This reverts commit 465176e0.
    0761d330
  • Mattia Rizzolo's avatar
    Revert "diffoscope/comparators/symlink.py: added a try except block to track" · 269864b7
    Mattia Rizzolo authored
    Copying the comment from
    659d1917:
    
        @Vibhu-guest also I'm reverting this one, mostly because the
        authoring information is screwed (root <root@localhost.localdomain> -
        does this mean you are doing your work as root??), and should have
        probably be gone through an MR instead of being pushed to master.
    
        I'm also at odds about the changes themselves.  You are catching
        that OSError in those two fairly specific positions, but it feels
        rather arbitrary.  Surely ENOSPC could happen anywhere?
    
        Finally, I think the user at the end should at least getting
        something that tells them what the problem is.  I think this way the
        program terminates without printing anything?
    
    This reverts commit 659d1917.
    269864b7
......@@ -19,9 +19,7 @@
import os
import logging
import sys
from diffoscope.exc import ContainerExtractionError
from diffoscope.tempfiles import get_named_temporary_file
from diffoscope.difference import Difference
......@@ -42,20 +40,10 @@ class Symlink(File):
return os.readlink(self.name)
def create_placeholder(self):
try:
with get_named_temporary_file('w+', delete=False) as f:
f.write('destination: %s\n' % self.symlink_destination)
f.flush()
return f.name
except OSError as ose:
if (ose.errno == 28):
sys.tracebacklimit = 0
raise ose
else:
raise
with get_named_temporary_file('w+', delete=False) as f:
f.write('destination: %s\n' % self.symlink_destination)
f.flush()
return f.name
@property
def path(self):
......
......@@ -152,13 +152,6 @@ class ZipContainer(Archive):
raise ContainerExtractionError(member_name, exc)
raise
except OSError as ose:
if (ose.errno == 28):
sys.tracebacklimit = 0
raise ose
else:
raise
def get_member(self, member_name):
zipinfo = self.archive.getinfo(member_name)
if zipinfo.filename[-1] == '/':
......