--- yummain.py.orig	2003-12-04 19:59:51.000000000 -0500
+++ yummain.py	2003-12-04 19:59:58.000000000 -0500
@@ -118,9 +118,7 @@
 def lock(lockfile, mypid):
     """do the lock file work"""
     #check out/get the lockfile
-    if yumlock.lock(lockfile, mypid, 0644):
-        pass
-    else:
+    while not yumlock.lock(lockfile, mypid, 0644):
         fd = open(lockfile, 'r')
         try: oldpid = int(fd.readline())
         except ValueError:
@@ -143,8 +141,6 @@
                 msg = _('Existing lock %s: another copy is running. Aborting.')
                 print msg % lockfile
                 sys.exit(200)
-        # lock again.
-        yumlock.lock(lockfile, mypid, 0644)
 
 def main(args):
     """This does all the real work"""

