diff options
Diffstat (limited to 'geo-replication/syncdaemon/syncdutils.py')
| -rw-r--r-- | geo-replication/syncdaemon/syncdutils.py | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py index c09b2505..2655dd98 100644 --- a/geo-replication/syncdaemon/syncdutils.py +++ b/geo-replication/syncdaemon/syncdutils.py @@ -419,3 +419,13 @@ def errno_wrap(call, arg=[], errnos=[]):              if not ex.errno == ESTALE:                  raise              time.sleep(0.5)  # retry the call + +def lstat(e): +    try: +        return os.lstat(e) +    except (IOError, OSError): +        ex = sys.exc_info()[1] +        if ex.errno == ENOENT: +            return ex.errno +        else: +            raise  | 
