[28174] in Source-Commits

home help back first fref pref prev next nref lref last post

locker-support commit [debian]: Fix bug in add -r handling of lockers

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Apr 17 10:02:50 2014

Date: Thu, 17 Apr 2014 10:02:43 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201404171402.s3HE2hDf012882@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/locker-support/commit/ba61c5339ec21eb90deda4ccb9634a18e263b7d9
commit ba61c5339ec21eb90deda4ccb9634a18e263b7d9
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Thu Apr 17 09:56:47 2014 -0400

    Fix bug in add -r handling of lockers
    
    - Remove pointless double loop.
    - call env.removeLocker with the mountpoint of the entry in the
      attachtab, not at.mounpoint, which is a nonexistent attribute

 attach   |    9 ++++-----
 setup.py |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/attach b/attach
index e1455c0..c51956b 100755
--- a/attach
+++ b/attach
@@ -281,14 +281,13 @@ if (len(argv) > 0) and (argv[0] == "-Padd"):
         for p in paths:
             env['PATH'].remove(p)
         at = None
-        for l in lockers:
+        for filesys in lockers:
             if at is None:
                 at = locker.read_attachtab()
-            for filesys in lockers:
-                if filesys not in at:
-                    print >>sys.stderr, "%s: Not attached." % (filesys,)
+            if filesys not in at:
+                print >>sys.stderr, "%s: Not attached." % (filesys,)
                 continue
-            env.removeLocker(at.mountpoint)
+            env.removeLocker(at[filesys].mountpoint)
     else:
         for filesys in lockers:
             mountpoint = attach_filesys(filesys, atoptions)
diff --git a/setup.py b/setup.py
index a10851d..384a4e8 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from distutils.core import setup
 
 setup(name='locker-support',
-      version='10.4.6',
+      version='10.4.7',
       author='Debathena Project',
       author_email='debathena@mit.edu',
       py_modules=['locker', 'athdir'],

home help back first fref pref prev next nref lref last post