[Pkg-bazaar-commits] ./bzr-gtk/unstable r543: Merge fix for broken symlink handling.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:44:36 UTC 2009


------------------------------------------------------------
revno: 543
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Fri 2008-07-18 12:38:13 +0200
message:
  Merge fix for broken symlink handling.
modified:
  NEWS
  olive/__init__.py
    ------------------------------------------------------------
    revno: 531.2.1
    committer: Jasper Groenewegen <colbrac at xs4all.nl>
    branch nick: LP125144-symlink
    timestamp: Sun 2008-07-13 18:45:25 +0200
    message:
      Fix for broken symlinks in working tree
    modified:
      olive/__init__.py
    ------------------------------------------------------------
    revno: 531.2.2
    committer: Jasper Groenewegen <colbrac at xs4all.nl>
    branch nick: LP125144-symlink
    timestamp: Tue 2008-07-15 03:02:52 +0200
    message:
      Replace fix by solution suggested by Scott Scriven
    modified:
      olive/__init__.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2008-07-18 10:36:32 +0000
+++ b/NEWS	2008-07-18 10:38:13 +0000
@@ -34,6 +34,8 @@
 
   * Fix progress bar handling. (Jelmer Vernooij)
 
+  * Fix broken symlink handling. (Jasper Groenewegen)
+
  CHANGES
 
   * Moved notify icon code to separate script. (Jelmer Vernooij)

=== modified file 'olive/__init__.py'
--- a/olive/__init__.py	2008-07-18 10:33:49 +0000
+++ b/olive/__init__.py	2008-07-18 10:38:13 +0000
@@ -19,6 +19,7 @@
 import os
 import sys
 import time
+import errno
 
 # gettext support
 import gettext
@@ -241,6 +242,9 @@
             self.combobox_drive.show()
             self.gen_hard_selector()
         
+        # Acceptable errors when loading files/folders in the treeviews
+        self.acceptable_errors = (errno.ENOENT, errno.ELOOP)
+        
         self._load_left()
 
         # Apply menu state
@@ -1018,7 +1022,7 @@
             try:
                 statinfo = os.stat(self.path + os.sep + item)
             except OSError, e:
-                if e.errno == 40:
+                if e.errno in self.acceptable_errors:
                     continue
                 else:
                     raise
@@ -1085,7 +1089,7 @@
             try:
                 statinfo = os.stat(self.path + os.sep + item)
             except OSError, e:
-                if e.errno == 40:
+                if e.errno in self.acceptable_errors:
                     continue
                 else:
                     raise
@@ -1323,7 +1327,7 @@
                 try:
                     statinfo = os.stat(self.path + os.sep + item)
                 except OSError, e:
-                    if e.errno == 40:
+                    if e.errno in self.acceptable_errors:
                         continue
                     else:
                         raise
@@ -1392,7 +1396,7 @@
                 try:
                     statinfo = os.stat(self.path + os.sep + item)
                 except OSError, e:
-                    if e.errno == 40:
+                    if e.errno in self.acceptable_errors:
                         continue
                     else:
                         raise



More information about the Pkg-bazaar-commits mailing list