From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci load_site.py
Date: 18 Sep 2006 21:23:45 -0000 [thread overview]
Message-ID: <20060918212345.15742.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-09-18 21:23:45
Modified files:
luci : load_site.py
Log message:
more dtml fixes
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/load_site.py.diff?cvsroot=cluster&r1=1.12&r2=1.13
--- conga/luci/load_site.py 2006/09/18 21:11:26 1.12
+++ conga/luci/load_site.py 2006/09/18 21:23:45 1.13
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# $Id: load_site.py,v 1.12 2006/09/18 21:11:26 rmccabe Exp $
+# $Id: load_site.py,v 1.13 2006/09/18 21:23:45 rmccabe Exp $
##############################################################################
#
@@ -354,7 +354,7 @@
def upload_dtml(object, f):
dir, name = os.path.split(f)
- f=open(f)
+ f=open(f, 'rb')
try:
db_id = name.split('.')
@@ -363,9 +363,10 @@
db_id = apply(lambda x,y: x + '.' + y, db_id[:-1])
name = db_id
except: pass
+ contents = f.read()
try:
- call(object.manage_addDTMLMethod, id=name, file=f)
+ call(object.manage_addDTMLMethod, id=name, file=contents)
if verbose: print 'Uploaded', name
except:
if verbose: print name, 'exists trying to delete then upload again'
@@ -373,7 +374,7 @@
call(object.manage_delObjects, ids=[name])
if verbose: print 'Deleted', name
try:
- call(object.manage_addDTMLMethod, id=name, file=f)
+ call(object.manage_addDTMLMethod, id=name, file=contents)
if verbose: print 'Uploaded', name
except: print 'Unable to upload', name
except: print 'Unable to delete', name
next reply other threads:[~2006-09-18 21:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-18 21:23 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-02 21:06 [Cluster-devel] conga/luci load_site.py rmccabe
2006-09-18 21:11 rmccabe
2006-08-11 16:31 rmccabe
2006-06-19 19:31 rmccabe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060918212345.15742.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).