Permalink
Browse files

[svn r2062] small fix to prevent version() from repeatedly reading ve…

…rsion.txt

--HG--
branch : trunk
  • Loading branch information...
1 parent a5f0f7f commit dd7fd955ea8112530bc0b04a44b482d320e7deb6 scoder committed Nov 22, 2006
Showing with 6 additions and 1 deletion.
  1. +6 −1 versioninfo.py
View
@@ -1,7 +1,12 @@
import os, sys, re
+__LXML_VERSION = None
+
def version():
- return open(os.path.join(get_src_dir(), 'version.txt')).read().strip()
+ global __LXML_VERSION
+ if __LXML_VERSION is None:
+ __LXML_VERSION = open(os.path.join(get_src_dir(), 'version.txt')).read().strip()
+ return __LXML_VERSION
def branch_version():
return version()[:3]

0 comments on commit dd7fd95

Please sign in to comment.