def __init__(self, path_eso, path_start, port): self.path_eso = path_eso self.pathdir_eso = vsu.path2dir(path_eso) self.pathdir_esonoclaste = vsu.path2dir(os.path.join(self.pathdir_eso, '..')) self.path_start = os.path.normpath(os.path.abspath(path_start)) ue.mezz(self.path_start) self.port = port self.gui = None self.trad = traductions self.comm = None self.init()
def __init__(self, path_eso, path_start, playername, port, TESTGUI=False): self.path_eso = path_eso self.pathdir_eso = vsu.path2dir(path_eso) self.pathdir_esonoclaste = vsu.path2dir(os.path.join(self.pathdir_eso, '..')) self.path_start = path_start self.playername = playername self.port = port self.TESTGUI = TESTGUI self.trad = traductions self.comm = None self.init(INIT=True)
def is_in_git_repo(path): dir0 = os.getcwd() dir1 = vsu.path2dir(path) os.chdir(dir1) if "fatal" in vsu.getoutput(which("git") + " status"): rsl = False else: rsl = True os.chdir(dir0) return rsl
def is_in_git_repo(path): dir0 = os.getcwd() dir1 = vsu.path2dir(path) os.chdir(dir1) git = which('git') rsl = False if git: if 'fatal' in vsu.getoutput(git+' status'): rsl=False else: rsl=True os.chdir(dir0) return rsl