1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 10:12:19 -05:00

Some fixes again. Damn you svn.

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@4089 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Tobias Markmann 2010-03-16 17:17:37 +00:00
parent 47c91ed367
commit 91310b1c90

View File

@ -65,26 +65,26 @@ class XEP:
def getLatestXEPFilename(XEPDIR, nr, no_interim=True): def getLatestXEPFilename(XEPDIR, nr, no_interim=True):
try: try:
xep = XEP(XEPDIR, nr) xep = XEP(XEPDIR, nr)
revs = xep.revisions() revs = xep.revisions()
revs.reverse() revs.reverse()
content = "" content = ""
if no_interim: if no_interim:
for rev in revs: for rev in revs:
tmp_content = xep.contentOfRevision(rev) tmp_content = xep.contentOfRevision(rev)
info = XEPInfo(tmp_content, " ") info = XEPInfo(tmp_content, " ")
if not info.interim: if not info.interim:
content = tmp_content content = tmp_content
break; break;
else: else:
content = xep.contentOfRevision(revs[len(revs)-1]) content = xep.contentOfRevision(revs[len(revs)-1])
(fd, name) = tempfile.mkstemp(); (fd, name) = tempfile.mkstemp();
handle = os.fdopen(fd, "w+b") handle = os.fdopen(fd, "w+b")
handle.write(content) handle.write(content)
handle.close() handle.close()
return name; return name;
except: except:
return False; return False;