Skip to content

Commit

Permalink
Updated syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
williambl committed Aug 17, 2017
1 parent 2314b19 commit 5201d0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 3 additions & 5 deletions CMAN_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ def print_help():

def get_mod_from_json(json_data):
if (json_data["Type"] == "Installer"):
mod = Mod(json_data["Name"], json_data["Link"], json_data["Author"],
mod = Mod(json_data["Name"], json_data["Author"],
json_data["Desc"], json_data["License"], json_data["Requirements"],
json_data["Incompatibilities"], json_data["Recommended"], json_data["Type"],
json_data["Unstable"], json_data["Versions"], json_data["InstallerName"])
else:
mod = Mod(json_data["Name"], json_data["Link"], json_data["Author"],
mod = Mod(json_data["Name"], json_data["Author"],
json_data["Desc"], json_data["License"], json_data["Requirements"],
json_data["Incompatibilities"], json_data["Recommended"], json_data["Type"],
json_data["Unstable"], json_data["Versions"])
Expand All @@ -500,9 +500,7 @@ def get_mod_from_name(modname):
return get_mod_from_json(get_json(modname))

def get_url(mod, version):
link = mod.link
version_number = 0
cprint(link)

for x in range(len(mod.versions)):
cprint(mod.versions[x]['Version'])
Expand All @@ -511,7 +509,7 @@ def get_url(mod, version):
version_number = x
break
cprint(x)
link = link.format(mod.versions[x]['Version'], mod.versions[x]['MCVersion'][0])
link = mod.versions[x]['Link']
cprint(link)
return link

Expand Down
4 changes: 1 addition & 3 deletions modclass.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
class Mod:

name = ''
link = ''
author = ''
desc = ''
license = ''
Expand All @@ -13,10 +12,9 @@ class Mod:
installer_name = ''
versions = []

def __init__(self, name, link, author, desc, license, reqr, incompat, recmd,
def __init__(self, name, author, desc, license, reqr, incompat, recmd,
_type, unstable, versions, instname = ''):
self.name = name
self.link = link
self.author = author
self.desc = desc
self.license = license
Expand Down

0 comments on commit 5201d0b

Please sign in to comment.