details:
http://www.bx.psu.edu/hg/galaxy/rev/8da91a231cdf
changeset: 2400:8da91a231cdf
user: Nate Coraor <nate(a)bx.psu.edu>
date: Tue May 05 13:03:23 2009 -0400
description:
Fix history deletion method in Galaxy check script
1 file(s) affected in this change:
scripts/check_galaxy.py
diffs (38 lines):
diff -r 3abf689d6f6f -r 8da91a231cdf scripts/check_galaxy.py
--- a/scripts/check_galaxy.py Tue May 05 12:03:40 2009 -0400
+++ b/scripts/check_galaxy.py Tue May 05 13:03:23 2009 -0400
@@ -141,15 +141,8 @@
print "Remaining datasets ids:", " ".join( p.dids )
raise Exception, "History still contains datasets after attempting to
delete them"
if new_history:
- self.get("/root/history_options")
- p = hidParser()
- p.feed(tc.browser.get_html())
- if p.hid is None:
- print "Unable to determine hid to delete old history"
- sys.exit(1)
- else:
- self.get("/root/history_delete?id=%s" % p.hid)
- tc.save_cookies(self.cookie_jar)
+ self.get("/history/delete_current")
+ tc.save_cookies(self.cookie_jar)
def check_redir(self, url):
try:
@@ -334,16 +327,6 @@
self.dids.append( i[1].rsplit("historyItemContainer-", 1)[1] )
dprint("got a dataset id: %s" % self.dids[-1])
-class hidParser(htmllib.HTMLParser):
- def __init__(self):
- htmllib.HTMLParser.__init__(self, formatter.NullFormatter())
- self.hid = None
- def start_a(self, attrs):
- for i in attrs:
- if i[0] == "href" and
i[1].startswith("/root/history_delete"):
- self.hid = i[1].rsplit("=", 1)[1]
- dprint("got a history id: %s" % self.hid)
-
class loggedinParser(htmllib.HTMLParser):
def __init__(self):
htmllib.HTMLParser.__init__(self, formatter.NullFormatter())