Fixed upload option in campaign server python script.
This commit is contained in:
parent
21949f008b
commit
483b8e081c
2 changed files with 7 additions and 5 deletions
|
@ -453,9 +453,11 @@ if __name__ == "__main__":
|
|||
elif options.upload:
|
||||
cs = CampaignServer(address)
|
||||
pbl = wmldata.read_file(options.upload, "PBL")
|
||||
name = os.path.basename(options.upload)
|
||||
name = os.path.splitext(name)[0]
|
||||
mythread = cs.put_campaign_async(
|
||||
pbl.get_text_val("title"),
|
||||
os.path.basename(options.upload),
|
||||
name,
|
||||
pbl.get_text_val("author"),
|
||||
pbl.get_text_val("passphrase"),
|
||||
pbl.get_text_val("description"),
|
||||
|
|
|
@ -552,8 +552,8 @@ def read_file(filename, root_name = "WML"):
|
|||
Read in a file from disk and return a WML data object, with the WML in the
|
||||
file placed under an entry with the name root_name.
|
||||
"""
|
||||
wmlparser = Parser(path, options.userpath)
|
||||
wmlparser.parse_file(filename)
|
||||
data = wmldata.DataSub(root_name)
|
||||
wmlparser.parse_top(data)
|
||||
parser = wmlparser.Parser(None)
|
||||
parser.parse_file(filename)
|
||||
data = DataSub(root_name)
|
||||
parser.parse_top(data)
|
||||
return data
|
||||
|
|
Loading…
Add table
Reference in a new issue