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:
parent
47c91ed367
commit
91310b1c90
42
xeputil.py
42
xeputil.py
@ -65,26 +65,26 @@ class XEP:
|
||||
|
||||
|
||||
def getLatestXEPFilename(XEPDIR, nr, no_interim=True):
|
||||
try:
|
||||
xep = XEP(XEPDIR, nr)
|
||||
revs = xep.revisions()
|
||||
revs.reverse()
|
||||
content = ""
|
||||
if no_interim:
|
||||
for rev in revs:
|
||||
tmp_content = xep.contentOfRevision(rev)
|
||||
info = XEPInfo(tmp_content, " ")
|
||||
if not info.interim:
|
||||
content = tmp_content
|
||||
break;
|
||||
try:
|
||||
xep = XEP(XEPDIR, nr)
|
||||
revs = xep.revisions()
|
||||
revs.reverse()
|
||||
content = ""
|
||||
if no_interim:
|
||||
for rev in revs:
|
||||
tmp_content = xep.contentOfRevision(rev)
|
||||
info = XEPInfo(tmp_content, " ")
|
||||
if not info.interim:
|
||||
content = tmp_content
|
||||
break;
|
||||
|
||||
else:
|
||||
content = xep.contentOfRevision(revs[len(revs)-1])
|
||||
else:
|
||||
content = xep.contentOfRevision(revs[len(revs)-1])
|
||||
|
||||
(fd, name) = tempfile.mkstemp();
|
||||
handle = os.fdopen(fd, "w+b")
|
||||
handle.write(content)
|
||||
handle.close()
|
||||
return name;
|
||||
except:
|
||||
return False;
|
||||
(fd, name) = tempfile.mkstemp();
|
||||
handle = os.fdopen(fd, "w+b")
|
||||
handle.write(content)
|
||||
handle.close()
|
||||
return name;
|
||||
except:
|
||||
return False;
|
||||
|
Loading…
Reference in New Issue
Block a user