Mon, 02 Sep 2019 18:50:38 +0200
Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
# -*- coding: utf-8 -*- # Copyright (c) 2014 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing some common utility functions for the Git package. """ from __future__ import unicode_literals import os from PyQt5.QtCore import QProcessEnvironment import Utilities def getConfigPath(): """ Public function to get the filename of the config file. @return filename of the config file (string) """ if Utilities.isWindowsPlatform(): userprofile = os.environ["USERPROFILE"] return os.path.join(userprofile, ".gitconfig") else: homedir = Utilities.getHomeDir() return os.path.join(homedir, ".gitconfig") def prepareProcess(proc, language=""): """ Public function to prepare the given process. @param proc reference to the process to be prepared (QProcess) @param language language to be set (string) """ env = QProcessEnvironment.systemEnvironment() # set the language for the process if language: env.insert("LANGUAGE", language) proc.setProcessEnvironment(env)