bin/gbuild-to-ide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 5d5ada6e0ed33d22f8b744621d2d151c31ae0033 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 25 10:46:10 2021 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Feb 26 08:54:56 2021 +0100 qtcreator: Move assignment to 'mode' out of try block The variable is used outside of the try block further down. While that works with how Python handles variable scopes (and there is no exception before the assignment happens), moving the variable outside makes the context/scope clearer. Change-Id: Iecfd0477ffb4515cf58736ee138fc8ca7273967f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111548 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index 10d9b2bcc47a..ac3115aa3d25 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -1754,6 +1754,7 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator): def emit(self): + mode = 'w+' self.base_folder = self.gbuildparser.builddir # we remove existing '.pro' and '.pro.shared' files @@ -1785,7 +1786,6 @@ class QtCreatorIntegrationGenerator(IdeIntegrationGenerator): try: content = QtCreatorIntegrationGenerator.pro_template % {'sources': sources, 'headers': headers, 'cxxflags': cxxflags, 'includepath': includepath, 'defines': defines} - mode = 'w+' with open(qt_pro_file, mode) as fpro: fpro.write(content) self._log("created %s\n" % qt_pro_file) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits