« Previous | Next » 

Revision aac3fbf0

IDaac3fbf0d5d660c9ec1c2041a22a624f96b83ac0

Added by Iustin Pop about 14 years ago

utils.FileLock: handle init errors properly

If the open of the lock file fails (due to whatever reason), 'self'
won't have the 'fd' attribute, and thus we fail in Close/__del__, which
will ruin proper error reporting:

IOError: [Errno 30] Read-only file system: '/var/lib/ganeti/queue/lock'
Exception exceptions.AttributeError: "'FileLock' object has no attribute
'fd'" in <bound method FileLock.__del__ of <ganeti.utils.FileLock object
at 0x2aaaad0bebd0>> ignored

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences