Skip to content

Commit

Permalink
* Check to see the given path exists
Browse files Browse the repository at this point in the history
* Syntax fix

* Tabs are fixed
  • Loading branch information
Artem Nurgaliev committed Jun 29, 2016
1 parent 83e1221 commit b252e6c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions andle/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ def find_config(data, name, path):


def find_dependency(data, tag, path):
no_dir = True
for f in os.listdir(path):
if (os.path.isdir(path + "/" + f)):
no_dir = False
find_dependency(data, tag + "/" + f, path + "/" + f)
if no_dir:
list = tag[1:].split("/")
version = list.pop(len(list) - 1)
name = list.pop(len(list) - 1)
package = ".".join(list)

update_value(version, data, package + ":" + name)
if os.path.exists(path):
no_dir = True
for f in os.listdir(path):
if (os.path.isdir(path + "/" + f)):
no_dir = False
find_dependency(data, tag + "/" + f, path + "/" + f)
if no_dir:
list = tag[1:].split("/")
version = list.pop(len(list) - 1)
name = list.pop(len(list) - 1)
package = ".".join(list)

update_value(version, data, package + ":" + name)


def update_value(var, obj, key):
Expand Down

0 comments on commit b252e6c

Please sign in to comment.