Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[wesnoth_addon_manager] Also upload sub-sections from the .pbl.

  • Loading branch information...
commit ae3697d4e8e1386593c59ea978837af4b68d722c 1 parent d62fbe5
@elias-pschernig elias-pschernig authored
View
11 data/tools/wesnoth/campaignserver_client.py
@@ -305,19 +305,16 @@ def get_campaign(self, name):
return None
- def put_campaign(self, name, cfgfile, directory, ign, stuff):
+ def put_campaign(self, name, cfgfile, directory, ign, pbl):
"""
- Uploads a campaign to the server. The title, name, author, passphrase,
- description, version and icon parameters are what would normally be
- found in a .pbl file.
+ Uploads a campaign to the server.
The cfgfile is the name of the main .cfg file of the campaign.
The directory is the name of the campaign's directory.
"""
- request = wmldata.DataSub("upload")
- for k, v in stuff.items():
- request.set_text_val(k, v)
+ request = pbl.copy()
+ request.name = "upload"
request.set_text_val("name", name)
data = wmldata.DataSub("data")
View
6 data/tools/wesnoth_addon_manager
@@ -327,11 +327,7 @@ dependencies="%s"
"*.wesnoth",
"*.project"]
- stuff = {}
- for field in pbl.children():
- stuff[field.name] = pbl.get_text_val(field.name)
-
- mythread = cs.put_campaign_async(name, cfgfile, wmldir, ign, stuff)
+ mythread = cs.put_campaign_async(name, cfgfile, wmldir, ign, pbl)
pcounter = 0
while not mythread.event.isSet():
Please sign in to comment.
Something went wrong with that request. Please try again.