]> git.street.me.uk Git - andy/viking.git/commitdiff
DEBUG option for gcget.
authorEvan Battaglia <gtoevan@gmx.net>
Thu, 27 Dec 2007 18:37:50 +0000 (18:37 +0000)
committerEvan Battaglia <gtoevan@gmx.net>
Thu, 27 Dec 2007 18:37:50 +0000 (18:37 +0000)
ChangeLog
tools/gcget

index bc0dcdca7219a70e10b336e06fb9b5433186651b..e464e39bcfad188ca9d71e259ed3294651c0ae6d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-27:
+Evan Battaglia <gtoevan@gmx.net>
+       * Minor fixes/debugging to gcget. Add gcget-perl
+       * Full screen mode.
+
 2007-12-27:
 Guilhem Bonnefille <guilhem.bonnefille@gmail.com>:
        * Add GpxWritingOptions to control GPX file writing
index 37231d54649c797edfdc1357cfa0e068accb055a..05aecb5cd71f07c35e969f60019289538e77e50b 100755 (executable)
@@ -45,12 +45,14 @@ Happy caching!!!
 #
 #
 try:
-  opts, args = getopt.gnu_getopt(sys.argv[1:], "u:p:", ["help"])
+  opts, args = getopt.gnu_getopt(sys.argv[1:], "u:p:d", ["help"])
 except getopt.GetoptError:
   # print help information and exit:
   help()
   sys.exit(2)
 
+DEBUG = False
+
 for o, a in opts:
   if o == "-p":
     PASS = a
@@ -59,6 +61,8 @@ for o, a in opts:
   if o == "--help" or o == "-h":
     help()
     sys.exit()
+  if o == "-d":
+    DEBUG = True
 
 if len(args) < 2:
   help()
@@ -109,7 +113,13 @@ try:
   b.select_form("form4")
 except:
   print >> sys.stderr, "Invalid username/password"
+  if DEBUG:
+    f=open("gcget.badlogin.html","w")
+    f.write(b.response().get_data())
+    f.close()
+    print >> sys.stderr, "Dumping last HTML page recieved into gcget.badlogin.html"
   sys.exit()
+
 b["origin_lat"] = lat
 b["origin_long"] = lon
 b["dist"] = maxdist