mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
use -1 as array index
This commit is contained in:
parent
ad65b93ef2
commit
43f90cb3b0
1 changed files with 3 additions and 3 deletions
|
@ -266,7 +266,7 @@ def getXlate( params, name, stringsHash ):
|
|||
# reduce org.eehouse.anroid.xxx to xxx, then turn it into a
|
||||
# variant and get the contents of the R.java file
|
||||
splits = name.split('.')
|
||||
name = splits[len(splits)-1]
|
||||
name = splits[-1]
|
||||
variant = variantFor( name );
|
||||
rPath = '%s/archive/R.java' % variant
|
||||
rDotJava = repo.cat( rPath, stringsHash )
|
||||
|
@ -279,11 +279,11 @@ def getXlate( params, name, stringsHash ):
|
|||
logging.debug('head = %s' % head)
|
||||
rjavarevs = repo.getRevsBetween(head, stringsHash, rPath)
|
||||
assert( 1 >= len(rjavarevs) )
|
||||
assert( stringsHash == rjavarevs[len(rjavarevs)-1] )
|
||||
assert( stringsHash == rjavarevs[-1] )
|
||||
if 1 == len(rjavarevs):
|
||||
firstPossible = head
|
||||
else:
|
||||
firstPossible = rjavarevs[len(rjavarevs)-2] + '^'
|
||||
firstPossible = rjavarevs[-2] + '^'
|
||||
# get actual number for rev^
|
||||
firstPossible = repo.getRevsBetween( firstPossible, firstPossible )[0]
|
||||
logging.debug('firstPossible: %s' % firstPossible)
|
||||
|
|
Loading…
Add table
Reference in a new issue