diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-16 03:34:12 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-16 03:34:12 -0700 |
commit | 68e60c137a791639174b3eb7848dbe381a28b0e1 (patch) | |
tree | 9b232518076d962ea78934fa8a5afd24d3c78975 | |
parent | 198bfde314e61d016c8a75aed1120295cfd4213d (diff) | |
download | portage-68e60c137a791639174b3eb7848dbe381a28b0e1.tar.gz portage-68e60c137a791639174b3eb7848dbe381a28b0e1.tar.bz2 portage-68e60c137a791639174b3eb7848dbe381a28b0e1.zip |
Handle OSError from os.path.samefile() (breakage from previous commit).
-rw-r--r-- | pym/portage/dbapi/bintree.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 2863b5c53..5d152452b 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -945,7 +945,11 @@ class binarytree(object): wantnewlockfile=1) if filename is not None: new_filename = self.getname(cpv) - if not os.path.samefile(filename, new_filename): + try: + samefile = os.path.samefile(filename, new_filename) + except OSError: + samefile = False + if not samefile: self._ensure_dir(os.path.dirname(new_filename)) _movefile(filename, new_filename, mysettings=self.settings) if self._all_directory and \ |