From a7e800d184096542fa23e3f463345436ad5c4a3b Mon Sep 17 00:00:00 2001 From: MaelREBOUX Date: Mon, 1 Aug 2022 15:04:41 +0200 Subject: [PATCH] no git tag exception --- cadastre/tools.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cadastre/tools.py b/cadastre/tools.py index 55f77797..05954686 100644 --- a/cadastre/tools.py +++ b/cadastre/tools.py @@ -80,11 +80,14 @@ def next_git_tag(): def set_window_title() -> str: """ Set the window title if on a dev version. """ - version = pluginMetadata('cadastre', 'version') - if version != 'master': - return '' + try: + version = pluginMetadata('cadastre', 'version') + if version != 'master': + return '' - # return 'branch {}, commit {}, next {}'.format( - # version, current_git_hash(), next_git_tag()) + # return 'branch {}, commit {}, next {}'.format( + # version, current_git_hash(), next_git_tag()) - return 'next {}'.format(next_git_tag()) + return 'next {}'.format(next_git_tag()) + except: + return "[no git tag]"