summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-13 04:09:59 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-13 04:09:59 +0000
commitd1290ebb30fc5a6b066db7898f7c25446e016fe1 (patch)
treefcc6fb67af3d9d9b99f9d0bc330ea30a5283373b /pym
parent034081780c220b938d90bbd93b06e8d410eb97c1 (diff)
downloadportage-d1290ebb30fc5a6b066db7898f7c25446e016fe1.tar.gz
portage-d1290ebb30fc5a6b066db7898f7c25446e016fe1.tar.bz2
portage-d1290ebb30fc5a6b066db7898f7c25446e016fe1.zip
Use startswith instead of slice or find.
svn path=/main/trunk/; revision=3841
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 3b90e88b9..c9d55ae76 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6493,13 +6493,13 @@ class dblink:
if stat.S_ISLNK(mymode):
# we are merging a symbolic link
myabsto=abssymlink(mysrc)
- if myabsto[0:len(srcroot)]==srcroot:
+ if myabsto.startswith(srcroot):
myabsto=myabsto[len(srcroot):]
if myabsto[0]!="/":
myabsto="/"+myabsto
myto=os.readlink(mysrc)
if self.settings and self.settings["D"]:
- if myto.find(self.settings["D"])==0:
+ if myto.startswith(self.settings["D"]):
myto=myto[len(self.settings["D"]):]
# myrealto contains the path of the real file to which this symlink points.
# we can simply test for existence of this file to see if the target has been merged yet