From 9b13e52892666753b504efe32b9c62d74320215b Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 15 Mar 2012 14:26:36 +0100 Subject: [PATCH] correctly detect colons --- debian_build.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian_build.py b/debian_build.py index d2ac110..5dc53e5 100755 --- a/debian_build.py +++ b/debian_build.py @@ -436,22 +436,22 @@ if __name__ == '__main__': if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'): # replace ~ with _ for tags version_tag = version.replace('~','_') - if version_tag.find(":"): - logger_error('Illegal character ":" in version %s detected. Please use a different version.' % version_tag) + if version_tag.find(":") != -1 : + logger_error('Illegal character ":" in version "%s" detected. Please use a different version.' % version_tag) exit_error() cmd = ['/usr/bin/git', 'tag', version_tag] try: subprocess.check_call(cmd) except: - logger_error('Could not tag repository with %s.' % version_tag) + logger_error('Could not tag repository with "%s".' % version_tag) exit_error() cmd = ['/usr/bin/git', 'push', 'origin', version_tag] try: subprocess.check_call(cmd) except: - logger_error('Could not push tag %s to repository.' % version_tag) + logger_error('Could not push tag "%s" to repository.' % version_tag) exit_error() - logger.info('Tagged as %s' % version_tag) + logger.info('Tagged as "%s".' % version_tag) try: # now upload create_dput_cfg() -- 2.39.5