summaryrefslogtreecommitdiff
path: root/artima
diff options
context:
space:
mode:
authormichele.simionato <devnull@localhost>2009-09-03 04:10:44 +0000
committermichele.simionato <devnull@localhost>2009-09-03 04:10:44 +0000
commit2d8899c3381faed8d6dc19cf52e8ade01402131c (patch)
tree19573899a091a6cda9bd5569f2f4af92f3689eca /artima
parenta3b9178f56055925c89ec342511380042c25cb2f (diff)
downloadmicheles-2d8899c3381faed8d6dc19cf52e8ade01402131c.tar.gz
Minor changes
Diffstat (limited to 'artima')
-rw-r--r--artima/general/what-i-am-doing.txt (renamed from artima/what-i-am-doing.txt)0
-rw-r--r--artima/post.py15
2 files changed, 14 insertions, 1 deletions
diff --git a/artima/what-i-am-doing.txt b/artima/general/what-i-am-doing.txt
index 7fea6e7..7fea6e7 100644
--- a/artima/what-i-am-doing.txt
+++ b/artima/general/what-i-am-doing.txt
diff --git a/artima/post.py b/artima/post.py
index b8a5d71..1248316 100644
--- a/artima/post.py
+++ b/artima/post.py
@@ -23,5 +23,18 @@ if __name__ == '__main__':
c.formvalue('1', 'password', 'pippolippo')
c.submit()
c.go('http://www.artima.com/weblogs/editpost.jsp?thread=%s' % thread)
- c.formvalue('1', 'body', text)
+ try:
+ c.formvalue('1', 'body', text)
+ except:
+ print "Saving the offending post on /tmp/x.txt ..."
+ file('/tmp/x.txt', 'w').write(text)
+ raise
c.submit()
+
+"""
+from ms.http_utils import urlopen2
+urlopen2('http://www.artima.com/sign_in?d=%2Findex.jsp',
+ dict(username='micheles', password='pippolippo'))
+urlopen2('http://www.artima.com/weblogs/editpost.jsp',
+ dict(thread='261364', body='prova'))
+"""