mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
add a function to return a formatted version
Replaces the various repeated format strings throughout the code.
This commit is contained in:
@@ -60,9 +60,9 @@ class CommandlineParser:
|
||||
def nominatim_version_text():
|
||||
""" Program name and version number as string
|
||||
"""
|
||||
text = 'Nominatim version %s.%s.%s.%s' % version.NOMINATIM_VERSION
|
||||
text = f'Nominatim version {version.version_str()}'
|
||||
if version.GIT_COMMIT_HASH is not None:
|
||||
text += ' (%s)' % version.GIT_COMMIT_HASH
|
||||
text += f' ({version.GIT_COMMIT_HASH})'
|
||||
return text
|
||||
|
||||
def add_subcommand(self, name, cmd):
|
||||
|
||||
Reference in New Issue
Block a user