Skip to content
Permalink
Browse files

Improve findSimilarVer

  • Loading branch information
zam1024t committed Sep 16, 2018
1 parent bbbf6ca commit c036c7bc92c86fb08b36b98fe2513ae2c697477e
Showing with 6 additions and 4 deletions.
  1. +6 −4 Localize.py
@@ -93,12 +93,14 @@ def getLink(locale):
return locale

def findSimilarVer():
sVer = ''
sVer = 0
for item in os.listdir(mDir):
subDir = os.path.join(mDir, item)
if os.path.isdir(subDir) and item.isdigit() and item < version:
sVer = item
return sVer
if item.isdigit() and os.path.isdir(subDir):
int_item = int(item)
if int_item > sVer and int_item < int(version):
sVer = int_item
return str(sVer)

def isset(dict, key):
try:

0 comments on commit c036c7b

Please sign in to comment.