modified unlock method in lockdir for debugging
# gotta own it to unlock self.confirm() print "waiting two seconds" time.sleep(2) for pos in range(10): try: if pos: self.confirm() except LockBroken: print "pre-rename missing lock ", i break except Exception, e: print "pre-rename fail: ", e raise try: self.transport.rename(self._held_dir, tmpname) except Exception, e: print "fail: ", e raise time.sleep(1) try: self.confirm() except LockBroken: print "rename-to-unlock successful" break except Exception, e: print "confirm fail: ", e raise else: print "ftp breakage" print "past unlock step" self._lock_held = False self.transport.delete(tmpname + self.__INFO_NAME)
modified unlock method in lockdir for debugging
# gotta own it to unlock
self. confirm( )
time. sleep(2)
try:
if pos:
self. confirm( )
except LockBroken:
print "pre-rename missing lock ", i
break
except Exception, e:
print "pre-rename fail: ", e
raise
try:
self. transport. rename( self._held_ dir, tmpname)
except Exception, e:
print "fail: ", e
raise
time. sleep(1)
try:
self. confirm( )
except LockBroken:
print "rename-to-unlock successful"
break
except Exception, e:
print "confirm fail: ", e
raise
else:
print "ftp breakage"
self. _lock_held = False
self. transport. delete( tmpname + self.__INFO_NAME)
print "waiting two seconds"
for pos in range(10):
print "past unlock step"