Author: elias
Date: Thu Oct  9 21:35:06 2008
New Revision: 29985

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29985&view=rev
Log:
Backporting revision 29984 (addon_manager).

Modified:
    branches/1.4/utils/campaigns_client.py

Modified: branches/1.4/utils/campaigns_client.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/utils/campaigns_client.py?rev=29985&r1=29984&r2=29985&view=diff
==============================================================================
--- branches/1.4/utils/campaigns_client.py (original)
+++ branches/1.4/utils/campaigns_client.py Thu Oct  9 21:35:06 2008
@@ -140,15 +140,7 @@
         version = info.get_or_create_sub("info").get_text_val("version", "")
         return uploads, version
 
-    if options.html:
-        cs = CampaignClient(address)
-        data = cs.list_campaigns()
-        if data:
-            import campaigns_client.html
-            campaigns_client.html.output(options.html, options.url, data)
-        else:
-            sys.stderr.write("Could not connect.\n")
-    elif options.list:
+    if options.list:
         cs = CampaignClient(address)
         data = cs.list_campaigns()
         if data:
@@ -301,6 +293,18 @@
             else:
                 sys.stdout.write(" - %s - is installed but not on server.\n" %
                     dirname)
+    elif options.html:
+        pass
     else:
         optionparser.print_help()
 
+    # This is independent, so a single call to the script can also do the
+    # HTML output.
+    if options.html:
+        cs = CampaignClient(address)
+        data = cs.list_campaigns()
+        if data:
+            import addon_manager.html
+            campaigns_client.html.output(options.html, options.url, data)
+        else:
+            sys.stderr.write("Could not connect.\n")


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to