check-mirrors return-mirrorlist.py, NONE, 1.1 check-mirrors.py, 1.3, 1.4

Seth Vidal (skvidal) fedora-extras-commits at redhat.com
Mon Jul 10 04:39:01 UTC 2006


Author: skvidal

Update of /cvs/fedora/check-mirrors
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12354

Modified Files:
	check-mirrors.py 
Added Files:
	return-mirrorlist.py 
Log Message:

- add stub for cgi
- make it default to /etc/check-mirrors.conf
- clean up todos




--- NEW FILE return-mirrorlist.py ---
#!/usr/bin/python -tt

#GPL - blah
# skvidal at fedoraproject.org

# - separate cgi script needed to return the proper geoip-based file for
#    the requesting client's country, if it exists, otherwise return the global
#    file.
#     - cgi should accept a get-variable which allows you to only output the
#       global mirrorlist - not the country-specific one and/or specify
#       a country.



Index: check-mirrors.py
===================================================================
RCS file: /cvs/fedora/check-mirrors/check-mirrors.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- check-mirrors.py	10 Jul 2006 04:32:49 -0000	1.3
+++ check-mirrors.py	10 Jul 2006 04:38:58 -0000	1.4
@@ -24,13 +24,6 @@
 # - push into a db?
 # - make sure we're overwriting the mirror lists output files, not simply 
 #    appending to the old ones
-# - separate cgi script needed to return the proper geoip-based file for
-#    the requesting client's country, if it exists, otherwise return the global 
-#    file.
-#     - cgi should accept a get-variable which allows you to only output the
-#       global mirrorlist - not the country-specific one and/or specify 
-#       a country.
-# - have it default to a config file in /etc/mirror-check.conf
 # - have it accept an option which specifies a section in the config file
 #    to operate on - rather than doing all of them.
 # - have it be able to use a remote mirrorlist as the inputfile
@@ -356,5 +349,11 @@
 
 
 if __name__ == '__main__':
-    main(sys.argv[1])
+    if len(sys.argv) < 2:
+        conf_fn = '/etc/check-mirrors.conf'
+    else:
+        conf_fn = 'sys.argv[1]'
+
+    main(conf_fn)
+
 




More information about the scm-commits mailing list