Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions util/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@
# return json.loads(response.text)

def hasHyphens(uuid):
pass
return

def stripUUID(uuid):
pass
return

def hyphenUUID(uuid):
pass
return

def hasError(json):
return json.has_key('error')

def toUUID(name):
# TODO: JSON request to get the uuid
respone = requests.get(url=UUID_URL + name)
json = json.loads(response.text)
_json = response.json()

if (not hasError(json)):
return hyphenUUID(json['id'])
if not hasError(_json):
return hyphenUUID(_json['id'])

return

Expand Down