version 0.10 - add --nowinscw option to avoid winscw binaries, add version to the user-agent string
authorWilliam Roberts <williamr@symbian.org>
Thu, 25 Feb 2010 21:37:09 +0000
changeset 172 5f1dcce7f6d4
parent 171 dd0383270574
child 173 048763260c9e
version 0.10 - add --nowinscw option to avoid winscw binaries, add version to the user-agent string
downloadkit/downloadkit.py
--- a/downloadkit/downloadkit.py	Thu Feb 25 14:51:33 2010 +0000
+++ b/downloadkit/downloadkit.py	Thu Feb 25 21:37:09 2010 +0000
@@ -25,7 +25,8 @@
 import hashlib
 import xml.etree.ElementTree as ET 
 
-user_agent = 'downloadkit.py script'
+version = '0.10'
+user_agent = 'downloadkit.py script v' + version
 headers = { 'User-Agent' : user_agent }
 top_level_url = "http://developer.symbian.org"
 download_list = []
@@ -360,6 +361,8 @@
 
 		if options.nosrc and re.match(r"(src_sfl|src_oss)", filename) :
 			continue 	# no snapshots of Mercurial source thanks...
+		if options.nowinscw and re.search(r"winscw", filename) :
+			continue 	# no winscw emulator...
 
 		if download_file(filename, downloadurl) != True :
 			continue # download failed
@@ -382,11 +385,13 @@
 
 	return 1
 
-parser = OptionParser(version="%prog 0.9", usage="Usage: %prog [options] version")
+parser = OptionParser(version="%prog "+version, usage="Usage: %prog [options] version")
 parser.add_option("-n", "--dryrun", action="store_true", dest="dryrun",
 	help="print the files to be downloaded, the 7z commands, and the recommended deletions")
 parser.add_option("--nosrc", action="store_true", dest="nosrc",
 	help="Don't download any of the source code available directly from Mercurial")
+parser.add_option("--nowinscw", action="store_true", dest="nowinscw",
+	help="Don't download the winscw emulator")
 parser.add_option("--nounzip", action="store_true", dest="nounzip",
 	help="Just download, don't unzip or delete any files")
 parser.add_option("--nodelete", action="store_true", dest="nodelete",
@@ -402,6 +407,7 @@
 parser.set_defaults(
 	dryrun=False, 
 	nosrc=False, 
+	nowinscw=False, 
 	nounzip=False, 
 	nodelete=False, 
 	progress=False,