Skip to content

Commit

Permalink
* python3 modify
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintin committed Jan 10, 2016
1 parent f5dcbd1 commit ffa1b14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions andle/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os
import sys
import version
import andle.version
from os.path import expanduser

DATA_PATH = expanduser("~") + "/.andle"
Expand Down Expand Up @@ -67,7 +67,7 @@ def find_dependency(data, tag, path):

def update_value(var, obj, key):
if key in obj:
if version.newer(obj[key], var) > 0:
if andle.version.newer(obj[key], var) > 0:
obj[key] = var
else:
obj[key] = var
3 changes: 3 additions & 0 deletions andle/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ def newer(version1, version2):
ret = -cmp(p, parts2[i])
if ret: return ret
return 0

def cmp(a, b):
return (a > b) - (a < b)

0 comments on commit ffa1b14

Please sign in to comment.