From: Zac Medico Date: Mon, 16 Aug 2010 10:34:12 +0000 (-0700) Subject: Handle OSError from os.path.samefile() (breakage from previous commit). X-Git-Tag: v2.2_rc68~164 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=68e60c137a791639174b3eb7848dbe381a28b0e1;p=portage.git Handle OSError from os.path.samefile() (breakage from previous commit). --- 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 \