diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-07 13:55:55 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 14:06:50 +0100 |
| commit | 2ac4f8b39711209ba9323fc221c1dcd185da57ea (patch) | |
| tree | cbaa1e573abd13c7827a5b4a57724fd884df148b /meta/lib/oe/cachedpath.py | |
| parent | 00052fe69582f238166511e733d3ba875cbe0ad2 (diff) | |
| download | poky-2ac4f8b39711209ba9323fc221c1dcd185da57ea.tar.gz | |
clases/lib: Use modern exception syntax
Update older code to use modern exception handling syntax which
is the form accepted by python 3.
(From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/cachedpath.py')
| -rw-r--r-- | meta/lib/oe/cachedpath.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py index e350c8a70e..c7860ef4fb 100644 --- a/meta/lib/oe/cachedpath.py +++ b/meta/lib/oe/cachedpath.py | |||
| @@ -125,7 +125,7 @@ class CachedPath(object): | |||
| 125 | # Note that listdir and error are globals in this module due | 125 | # Note that listdir and error are globals in this module due |
| 126 | # to earlier import-*. | 126 | # to earlier import-*. |
| 127 | names = os.listdir(top) | 127 | names = os.listdir(top) |
| 128 | except error, err: | 128 | except error as err: |
| 129 | if onerror is not None: | 129 | if onerror is not None: |
| 130 | onerror(err) | 130 | onerror(err) |
| 131 | return | 131 | return |
| @@ -221,7 +221,7 @@ class CachedPath(object): | |||
| 221 | file = self.__realpath_rel(root, file[(len(root) - 1):], root, loop_cnt, assume_dir) | 221 | file = self.__realpath_rel(root, file[(len(root) - 1):], root, loop_cnt, assume_dir) |
| 222 | else: | 222 | else: |
| 223 | file = self.__realpath(file, root, loop_cnt, assume_dir)[0] | 223 | file = self.__realpath(file, root, loop_cnt, assume_dir)[0] |
| 224 | except OSError, e: | 224 | except OSError as e: |
| 225 | if e.errno == errno.ELOOP: | 225 | if e.errno == errno.ELOOP: |
| 226 | # make ELOOP more readable; without catching it, there will | 226 | # make ELOOP more readable; without catching it, there will |
| 227 | # be printed a backtrace with 100s of OSError exceptions | 227 | # be printed a backtrace with 100s of OSError exceptions |
