aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-11-12 12:18:32 -0500
committerW. Trevor King <wking@tremily.us>2012-11-12 12:18:32 -0500
commit6e82ee270a73afa4c827afbb14d3dc7062773389 (patch)
treee624951be78f8d23cad8edcc11d6a815b1d7424a /libbe
parent888300a933b32c1edf9cdecd0d24d6b30c6c4ed5 (diff)
downloadbugseverywhere-6e82ee270a73afa4c827afbb14d3dc7062773389.tar.gz
version: convert to Python 3 compatibility
Diffstat (limited to 'libbe')
-rwxr-xr-xlibbe/version.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/libbe/version.py b/libbe/version.py
index 64a4408..14a9f1e 100755
--- a/libbe/version.py
+++ b/libbe/version.py
@@ -32,9 +32,9 @@ import copy
import libbe.storage
try:
from ._version import version_info
-except ImportError, e:
+except ImportError as e:
import logging
- logging.warn('unable to import libbe._version: %s' % e)
+ logging.warn('unable to import libbe._version: {0}'.format(e))
version_info = {
'revision': 'unknown',
'date': 'unknown',
@@ -57,13 +57,15 @@ def version(verbose=False):
if verbose == True:
info = copy.copy(version_info)
info['storage'] = libbe.storage.STORAGE_VERSION
- string += ("\n"
- "revision: %(revision)s\n"
- "date: %(date)s\n"
- "committer: %(committer)s\n"
- "storage version: %(storage)s"
- % info)
+ string += (
+ '\n'
+ 'revision: {revision}\n'
+ 'date: {date}\n'
+ 'committer: {committer}\n'
+ 'storage version: {storage}'
+ ).format(**info)
return string
-if __name__ == "__main__":
- print version(verbose=True)
+
+if __name__ == '__main__':
+ print(version(verbose=True))