repoman: use slice to avoid IndexError
authorZac Medico <zmedico@gentoo.org>
Wed, 27 Oct 2010 16:44:46 +0000 (09:44 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 27 Oct 2010 16:44:46 +0000 (09:44 -0700)
bin/repoman

index d2490731070d859c1e50387198a881ad2c356232..0265e9dd5fd905fd9298a807b0de5b19300738b3 100755 (executable)
@@ -2151,7 +2151,7 @@ else:
 
        if vcs == "svn":
                svnstatus = os.popen("svn status").readlines()
-               mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and (elem[0] in "MR" or elem[1] in "M")]
+               mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if (elem[:1] in "MR" or elem[1:2] in "M")]
                mynew     = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A")]
                myremoved = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D")]