366 output = str(proc.readAllStandardOutput(), |
366 output = str(proc.readAllStandardOutput(), |
367 Preferences.getSystem("IOEncoding"), |
367 Preferences.getSystem("IOEncoding"), |
368 'replace') |
368 'replace') |
369 if exeModule and exeModule[0] == "-m" and \ |
369 if exeModule and exeModule[0] == "-m" and \ |
370 ("ImportError:" in output or |
370 ("ImportError:" in output or |
371 "ModuleNotFoundError:" in output): |
371 "ModuleNotFoundError:" in output or |
|
372 proc.exitCode() != 0): |
372 version = self.tr("(module not found)") |
373 version = self.tr("(module not found)") |
373 else: |
374 else: |
374 if versionRe is None: |
375 if versionRe is None: |
375 versionRe = "^{0}".format( |
376 versionRe = "^{0}".format( |
376 re.escape(versionStartsWith)) |
377 re.escape(versionStartsWith)) |