diff options
Diffstat (limited to 'meta/lib/oe/path.py')
-rw-r--r-- | meta/lib/oe/path.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py index 76a6ed8314..d8eb80225f 100644 --- a/meta/lib/oe/path.py +++ b/meta/lib/oe/path.py | |||
@@ -107,7 +107,7 @@ def remove(path, recurse=True): | |||
107 | for name in glob.glob(path): | 107 | for name in glob.glob(path): |
108 | try: | 108 | try: |
109 | os.unlink(name) | 109 | os.unlink(name) |
110 | except OSError, exc: | 110 | except OSError as exc: |
111 | if recurse and exc.errno == errno.EISDIR: | 111 | if recurse and exc.errno == errno.EISDIR: |
112 | shutil.rmtree(name) | 112 | shutil.rmtree(name) |
113 | elif exc.errno != errno.ENOENT: | 113 | elif exc.errno != errno.ENOENT: |
@@ -119,7 +119,7 @@ def symlink(source, destination, force=False): | |||
119 | if force: | 119 | if force: |
120 | remove(destination) | 120 | remove(destination) |
121 | os.symlink(source, destination) | 121 | os.symlink(source, destination) |
122 | except OSError, e: | 122 | except OSError as e: |
123 | if e.errno != errno.EEXIST or os.readlink(destination) != source: | 123 | if e.errno != errno.EEXIST or os.readlink(destination) != source: |
124 | raise | 124 | raise |
125 | 125 | ||
@@ -247,7 +247,7 @@ def realpath(file, root, use_physdir = True, loop_cnt = 100, assume_dir = False) | |||
247 | file = __realpath_rel(root, file[(len(root) - 1):], root, loop_cnt, assume_dir) | 247 | file = __realpath_rel(root, file[(len(root) - 1):], root, loop_cnt, assume_dir) |
248 | else: | 248 | else: |
249 | file = __realpath(file, root, loop_cnt, assume_dir)[0] | 249 | file = __realpath(file, root, loop_cnt, assume_dir)[0] |
250 | except OSError, e: | 250 | except OSError as e: |
251 | if e.errno == errno.ELOOP: | 251 | if e.errno == errno.ELOOP: |
252 | # make ELOOP more readable; without catching it, there will | 252 | # make ELOOP more readable; without catching it, there will |
253 | # be printed a backtrace with 100s of OSError exceptions | 253 | # be printed a backtrace with 100s of OSError exceptions |