projects
/
catalyst.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4377598
)
optimize set_release_vesion() to use strings format()
author
Brian Dolbec
<dolsen@gentoo.org>
Thu, 6 Jun 2013 16:59:25 +0000
(09:59 -0700)
committer
W. Trevor King
<wking@tremily.us>
Tue, 11 Jun 2013 13:49:44 +0000
(09:49 -0400)
catalyst/version.py
patch
|
blob
|
history
diff --git
a/catalyst/version.py
b/catalyst/version.py
index 6309a6c63d7f127bc46fcc72bc5ad939825bca4a..989945a4bc899216f3ce97328f52e172a496284a 100644
(file)
--- a/
catalyst/version.py
+++ b/
catalyst/version.py
@@
-56,9
+56,8
@@
def set_release_version(version, root=None):
path = pjoin(os.path.dirname(__file__), filename)
else:
path = pjoin(root, filename)
-
#
__version__ = version
+ __version__ = version
ver = get_git_version(version)
- ver = ver.replace('\n', '\\n')
with open(path, 'w') as f:
- f.write("version =
'%s'" % ver
)
+ f.write("version =
{0!r}".format(ver)
)