Andreas, if you are still have this setup, could you please do me a favour? I am wanting to clean up this code, but do not want to break this again, and I have been unable to replicate this error on my machine.
If you can help, could you please:
1) Find the relevant block in duplicity/path.py:
if self.type in ("chr", "blk"):
try: self.devnums = (os.major(self.stat.st_rdev), os.minor(self.stat.st_rdev))
except: log.Warn(_("Warning: %s invalid devnums (0x%X), treating as (0, 0).") % (util.ufn(self.get_relative_path()), self.stat.st_rdev)) self.devnums = (0, 0)
2) Replace it with the old version that used to be broken and see if you get the OverflowError:
if self.type in ("chr", "blk"): self.devnums = (os.major(self.stat.st_rdev), os.minor(self.stat.st_rdev))
3) If you do still get the error, try this slightly modified version and see if it fixes the error:
if self.type in ("chr", "blk"):
try: self.devnums = (os.major(self.stat.st_rdev), os.minor(self.stat.st_rdev))
except OverflowError: log.Warn(_("Warning: %s invalid devnums (0x%X), treating as (0, 0).") % (util.ufn(self.get_relative_path()), self.stat.st_rdev)) self.devnums = (0, 0)
Andreas, if you are still have this setup, could you please do me a favour? I am wanting to clean up this code, but do not want to break this again, and I have been unable to replicate this error on my machine.
If you can help, could you please:
1) Find the relevant block in duplicity/path.py:
if self.type in ("chr", "blk"):
self. devnums = (os.major( self.stat. st_rdev) ,
os. minor(self. stat.st_ rdev))
log.Warn( _("Warning: %s invalid devnums (0x%X), treating as (0, 0).")
% (util.ufn( self.get_ relative_ path()) , self.stat.st_rdev))
self. devnums = (0, 0)
try:
except:
2) Replace it with the old version that used to be broken and see if you get the OverflowError:
if self.type in ("chr", "blk"):
self. devnums = (os.major( self.stat. st_rdev) ,
os.minor( self.stat. st_rdev) )
3) If you do still get the error, try this slightly modified version and see if it fixes the error:
if self.type in ("chr", "blk"):
self. devnums = (os.major( self.stat. st_rdev) ,
os. minor(self. stat.st_ rdev))
log.Warn( _("Warning: %s invalid devnums (0x%X), treating as (0, 0).")
% (util.ufn( self.get_ relative_ path()) , self.stat.st_rdev))
self. devnums = (0, 0)
try:
except OverflowError: