bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def ToolCommand(self): """Get the valgrind command to run.""" tool_name = self.ToolName()
def ToolCommand(self): """Get the valgrind command to run.""" tool_name = self.ToolName()
476,300
def Analyze(self, check_sanity=False): # Glob all the results files in the "testing.tmp" directory filenames = glob.glob(self.TMP_DIR + "/*/results.txt")
def Analyze(self, check_sanity=False): # Glob all the results files in the "testing.tmp" directory filenames = glob.glob(self.TMP_DIR + "/*/results.txt")
476,301
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
476,302
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
476,303
def ApplyDirectoryRules(existing_rules, dir_name): """Combines rules from the existing rules and the new directory. Any directory can contain a DEPS file. Toplevel DEPS files can contain module dependencies which are used by gclient. We use these, along with additional include rules and implicit rules for the given di...
def ApplyDirectoryRules(existing_rules, dir_name): """Combines rules from the existing rules and the new directory. Any directory can contain a DEPS file. Toplevel DEPS files can contain module dependencies which are used by gclient. We use these, along with additional include rules and implicit rules for the given di...
476,304
def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is...
def testCrazyFilenames(self): """Test downloading with filenames containing special chars. The files are created on the fly and cleaned after use. """ download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(tes...
476,305
def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is...
def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is...
476,306
def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is...
def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is...
476,307
def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is...
def testCrazyFilenames(self): """Test downloading with filenames containing special chars.""" download_dir = self.GetDownloadDirectory().value() test_dir = os.path.join(os.path.abspath(self.DataDir()), 'downloads', 'crazy_filenames') data_file = os.path.join(test_dir, 'download_filenames') filenames = filter(os.path.is...
476,308
def testDownloadInIncognito(self): """Download a zip in incognito window and verify.
def testDownloadInIncognito(self): """Download a zip in incognito window and verify.
476,309
def testDownloadInIncognito(self): """Download a zip in incognito window and verify.
def testDownloadInIncognito(self): """Download a zip in incognito window and verify.
476,310
def __init__(self, options): self._options = options
def __init__(self, options): self._options = options
476,311
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,312
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,313
def TryKillingOldServer(port): # Note that an HTTP /kill request to the FTP server has the effect of # killing it. for protocol in ["http", "https"]: try: urllib2.urlopen("%s://localhost:%d/kill" % (protocol, port)).read() print "Killed old server instance on port %d (via %s)" % (port, protocol) except urllib2.URLError...
def TryKillingOldServer(port): # Note that an HTTP /kill request to the FTP server has the effect of # killing it. for protocol in ["http", "https"]: try: urllib2.urlopen("%s://localhost:%d/kill" % (protocol, port)).read() print "Killed old server instance on port %d (via %s)" % (port, protocol) except urllib2.URLError...
476,314
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port # Try to free up the port if there's an orphaned old instance. TryKillingOldServer(port) if options.server_type == SERVER_HTTP: if opt...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port # Try to free up the port if there's an orphaned old instance. TryKillingOldServer(port) if options.server_type == SERVER_HTTP: if opt...
476,315
def CombineLibraries(output, remove_re, inputs): '''Combines all the libraries and objects in inputs, while removing any object files that match remove_re. ''' removals = [] if remove_re: removals = CollectRemovals(remove_re, inputs) print removals args = ['lib.exe', '/out:%s' % output] args += ['/remove:%s' % obj fo...
def CombineLibraries(output, remove_re, inputs): '''Combines all the libraries and objects in inputs, while removing any object files that match remove_re. ''' removals = [] if remove_re: removals = CollectRemovals(remove_re, inputs) print removals args = ['lib.exe', '/out:%s' % output] args += ['/remove:%s' % obj fo...
476,316
def Main(): '''Main function for this script''' parser = GetOptionParser() (opt, args) = parser.parse_args() output = opt.output remove = opt.remove if not output: parser.error('You must specify an output file') if not args: parser.error('You must specify at least one object or library') output = output.strip() remov...
def Main(): '''Main function for this script''' parser = GetOptionParser() (opt, args) = parser.parse_args() output = opt.output remove = opt.remove if not output: parser.error('You must specify an output file') if not args: parser.error('You must specify at least one object or library') output = output.strip() remov...
476,317
def main(argv): if len(argv) < 3: print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() extractor = OrderedJSFilesExtractor(argv[1]) expander = PathExpander(argv[2:]) output = StringIO() for input_file_name in extractor.ordered_js_file...
def main(argv): if len(argv) < 3: print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() input_order_file_name = argv[1] extractor = OrderedJSFilesExtractor(input_order_file_name) expander = PathExpander(argv[2:]) output = StringIO() fo...
476,318
def main(argv): if len(argv) < 3: print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() extractor = OrderedJSFilesExtractor(argv[1]) expander = PathExpander(argv[2:]) output = StringIO() for input_file_name in extractor.ordered_js_file...
def main(argv): if len(argv) < 3: print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() extractor = OrderedJSFilesExtractor(argv[1]) expander = PathExpander(argv[2:]) output = StringIO() for input_file_name in extractor.ordered_js_file...
476,319
def SimpleTest(self, module, name, heapcheck_test_args=None, cmd_args=None): '''Builds the command line and runs the specified test.
def SimpleTest(self, module, name, heapcheck_test_args=None, cmd_args=None): '''Builds the command line and runs the specified test.
476,320
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" gl_error = None count = 0 for arg in...
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues(func) for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" gl_error = None count = 0 for ar...
476,321
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention declaration.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) f...
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" ...
476,322
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention declaration.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) f...
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention declaration.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) f...
476,323
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) arg_string = func.MakeOriginalArgString("") comma = "" if len(arg_string) > 0: comma = ", " file.Write(" helper_->%s(%s%sres...
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) arg_string = func.MakeOriginalArgString("") comma = "" if len(arg_string) > 0: comma = ", " file.Write(" helper_->%s(%s%sres...
476,324
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): Implement this\n") TypeHandler.WriteGLES2ImplementationHeader(self, func, file)
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): Implement this\n") TypeHandler.WriteGLES2ImplementationHeader(self, func, file)
476,325
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): %s\n\n" % func.name)
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("// TODO(gman): %s\n\n" % func.name)
476,326
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetOriginalArgs() all_but_last_2_args = args[:-2] for arg in all_but_l...
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode...
476,327
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetOriginalArgs() all_but_last_2_args = args[:-2] for arg in all_but_l...
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetOriginalArgs() all_but_last_2_args = args[:-2] for arg in all_but_l...
476,328
def GetNumInvalidValues(self): """returns the number of invalid values to be tested.""" return 0
def GetNumInvalidValues(self, func): """returns the number of invalid values to be tested.""" return 0
476,329
def WriteValidationCode(self, file): """Writes the validation code for an argument.""" if self.type == 'GLsizei' or self.type == 'GLsizeiptr': file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
def WriteValidationCode(self, file): """Writes the validation code for an argument.""" if self.type == 'GLsizei' or self.type == 'GLsizeiptr': file.Write(" if (%s < 0) {\n" % self.name) file.Write(" SetGLError(GL_INVALID_VALUE);\n") file.Write(" return error::kNoError;\n") file.Write(" }\n")
476,330
def GetNumInvalidValues(self): """overridden from Argument.""" return 1
def GetNumInvalidValues(self, func): """overridden from Argument.""" return 1
476,331
def GetInvalidArg(self, offset, index): """returns an invalid value and expected parse result by index.""" return ("-1", "kNoError", "GL_INVALID_VALUE")
def GetInvalidArg(self, offset, index): """overridden from Argument.""" return ("-1", "kNoError", "GL_INVALID_VALUE")
476,332
def GetInvalidArg(self, offset, index): """returns an invalid value and expected parse result by index.""" return ("-1", "kNoError", "GL_INVALID_VALUE")
def GetInvalidArg(self, offset, index): """returns an invalid value and expected parse result by index.""" return ("-1", "kNoError", "GL_INVALID_VALUE")
476,333
def GetNumInvalidValues(self): """returns the number of invalid values to be tested.""" if 'invalid' in self.enum_info: invalid = self.enum_info['invalid'] return len(invalid) return 0
def GetNumInvalidValues(self, func): """returns the number of invalid values to be tested.""" if 'invalid' in self.enum_info: invalid = self.enum_info['invalid'] return len(invalid) return 0
476,334
def GetInvalidArg(self, offset, index): """returns an invalid value by index.""" if 'invalid' in self.enum_info: invalid = self.enum_info['invalid'] num_invalid = len(invalid) if index >= num_invalid: index = num_invalid - 1 return (invalid[index], "kNoError", "GL_INVALID_ENUM") return ("---ERROR1---", "kNoError", "GL_...
def GetInvalidArg(self, offset, index): """returns an invalid value by index.""" if 'invalid' in self.enum_info: invalid = self.enum_info['invalid'] num_invalid = len(invalid) if index >= num_invalid: index = num_invalid - 1 return (invalid[index], "kNoError", "GL_INVALID_ENUM") return ("---ERROR1---", "kNoError", "GL_...
476,335
def GetNumInvalidValues(self): """Overridden from Argument.""" return 2
def GetNumInvalidValues(self, func): """Overridden from Argument.""" return 2
476,336
def add(self, name, arcname=None, recursive=True, exclude=None): if exclude is not None and exclude(name): return tarfile.TarFile.add(self, name, arcname=arcname, recursive=recursive)
def add(self, name, arcname=None, recursive=True, exclude=None): head, tail = os.path.split(name) if tail in ('.svn', '.git'): return tarfile.TarFile.add(self, name, arcname=arcname, recursive=recursive)
476,337
def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True
def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True
476,338
def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True
def ShouldExcludePath(path): head, tail = os.path.split(path) if tail in ('.svn', '.git'): return True
476,339
def __WriteLine(self, line, ends_with_eol): """Given a signle line, writes it to a file, splitting if it's > 80 chars""" if len(line) >= 80: i = self.__FindSplit(line) if i > 0: line1 = line[0:i + 1] self.file.write(line1 + '\n') match = re.match("( +)", line1) indent = "" if match: indent = match.group(1) splitter = l...
def __WriteLine(self, line, ends_with_eol): """Given a signle line, writes it to a file, splitting if it's > 80 chars""" if len(line) >= 80: i = self.__FindSplit(line) if i > 0: line1 = line[0:i + 1] nolint = '' if len(line1) > 80: nolint = ' // NOLINT' self.file.write(line1 + nolint + '\n') match = re.match("( +)", l...
476,340
def __WriteLine(self, line, ends_with_eol): """Given a signle line, writes it to a file, splitting if it's > 80 chars""" if len(line) >= 80: i = self.__FindSplit(line) if i > 0: line1 = line[0:i + 1] self.file.write(line1 + '\n') match = re.match("( +)", line1) indent = "" if match: indent = match.group(1) splitter = l...
def __WriteLine(self, line, ends_with_eol): """Given a signle line, writes it to a file, splitting if it's > 80 chars""" if len(line) >= 80: i = self.__FindSplit(line) if i > 0: line1 = line[0:i + 1] self.file.write(line1 + '\n') match = re.match("( +)", line1) indent = "" if match: indent = match.group(1) splitter = l...
476,341
def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', pid]) sys.exit(0)
def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', str(pid)]) sys.exit(0)
476,342
def kill(self): """Kill our running process if needed. Wait for kill to complete.
def kill(self): """Kill our running process if needed. Wait for kill to complete.
476,343
def kill(self): """Kill our running process if needed. Wait for kill to complete.
def kill(self): """Kill our running process if needed. Wait for kill to complete.
476,344
def retcode(self): """Return the return value of the subprocess.
def retcode(self): """Return the return value of the subprocess.
476,345
def setUp(self): global WEBDRIVER_SERVER_URL global WEBDRIVER_PROCESS WEBDRIVER_PROCESS = subprocess.Popen([WEBDRIVER_EXE, '--port=%d' % WEBDRIVER_PORT]) if WEBDRIVER_PROCESS == None: print "Chromium executable not found. The path used was: " print WEBDRIVER_EXE sys.exit(-1)
def setUp(self): global WEBDRIVER_SERVER_URL global WEBDRIVER_PROCESS WEBDRIVER_PROCESS = subprocess.Popen([WEBDRIVER_EXE, '--port=%d' % WEBDRIVER_PORT]) if WEBDRIVER_PROCESS == None: print "Chromium executable not found. The path used was: " print WEBDRIVER_EXE sys.exit(-1)
476,346
def assertURL(self, url): u = self.driver.get_current_url() self.assertEqual(u, url)
def assertURL(self, url): u = self.driver.get_current_url() self.assertEqual(u, url)
476,347
def testNavigation(self): # Loads two pages into chrome's navigation history. self.navigate(self.NEWS) self.navigate(self.SEARCH)
def testNavigation(self): # Loads two pages into chrome's navigation history. self.navigate(self.NEWS) self.navigate(self.SEARCH)
476,348
def testNoTranslate(self): """Tests that a page isn't translated if the user declines translate.""" self._NavigateAndWaitForBar(self._GetDefaultSpanishURL()) self.SelectTranslateOption('decline_translation') self.WaitForInfobarCount(0) translate_info = self.GetTranslateInfo() self.assertEqual(self.spanish, translate_in...
def testNoTranslate(self): """Tests that a page isn't translated if the user declines translate.""" self._NavigateAndWaitForBar(self._GetDefaultSpanishURL()) self.SelectTranslateOption('decline_translation') translate_info = self.GetTranslateInfo() self.assertEqual(self.spanish, translate_info['original_language']) sel...
476,349
def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', str(pid)]) sys.exit(0)
def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', str(pid)]) sys.exit(0)
476,350
def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', str(pid)]) sys.exit(0)
def TerminateSignalHandler(sig, stack): """When killed, try and kill our child processes.""" signal.signal(sig, signal.SIG_DFL) for pid in gChildPIDs: if 'kill' in os.__all__: # POSIX os.kill(pid, sig) else: subprocess.call(['taskkill.exe', '/PID', str(pid)]) sys.exit(0)
476,351
def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he...
def run(self): stdout_file = tempfile.TemporaryFile() try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get here the process is dead. gChildPIDs.remove(self._process.pid) self._queue.put(RunProgramT...
476,352
def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he...
def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he...
476,353
def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he...
def run(self): self._process = subprocess.Popen(self._cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) gChildPIDs.append(self._process.pid) try: while True: line = self._process.stdout.readline() if not line: # EOF break print line, self._queue.put(RunProgramThread.LINE, True) except IOError: pass # If we get he...
476,354
def RunUntilCompletion(self, timeout): """Run thread until completion or timeout (in seconds).
def RunUntilCompletion(self, timeout): """Run thread until completion or timeout (in seconds).
476,355
def Start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.IsRunning(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name)
def Start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.IsRunning(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name)
476,356
def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
def WriteGLES2ImplementationDeclaration(self, func, file): """Writes the GLES2 Implemention declaration.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n")
476,357
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') impl_decl = func.GetInfo('impl_decl') if (func.can_auto_generate and (impl_func == None or impl_func == True) and (impl_decl == None or impl_decl == True)): file.Write("%s %s(%s) {\n" % (func...
def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) for arg in fu...
476,358
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
476,359
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOri...
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" FreeIds(%s);\n" % func.MakeOri...
476,360
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:...
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:...
476,361
code = """ typedef %(func_name)s::Result Result;
code = """ typedef %(func_name)s::Result Result;
476,362
code = """ typedef %(func_name)s::Result Result;
code = """ typedef %(func_name)s::Result Result;
476,363
def main(): cmd = [sys.executable] src_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(sys.argv[0])))))) script_dir=os.path.join(src_dir, "third_party", "WebKit", "WebKitTools", "Scripts") script = os.path.join(script_dir, 'new-run-webkit-tests') cmd.append(script) if '...
def main(): cmd = [sys.executable] src_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(sys.argv[0])))))) script_dir=os.path.join(src_dir, "third_party", "WebKit", "WebKitTools", "Scripts") script = os.path.join(script_dir, 'new-run-webkit-tests') cmd.append(script) if '...
476,364
def serve_forever(self): self.stop = False self.nonce = None while not self.stop: self.handle_request() self.socket.close()
def serve_forever(self): self.stop = False self.nonce_time = None while not self.stop: self.handle_request() self.socket.close()
476,365
def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed."""
def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed."""
476,366
def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed."""
def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed."""
476,367
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(name)s(%(typed_args)s) {
476,368
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" %s_id_handler_->FreeIds(%s);\n...
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write(" %s_id_handler_->FreeIds(%s);\n...
476,369
code = """ typedef %(func_name)s::Result Result;
code = """ typedef %(func_name)s::Result Result;
476,370
def parse_json_file(path, encoding="utf-8"): """ Load the specified file and parse it as JSON. Args: path: Path to a file containing JSON-encoded data. encoding: Encoding used in the file. Defaults to utf-8. Returns: A Python object representing the data encoded in the file. Raises: Exception: If the file could not...
def parse_json_file(path, encoding="utf-8"): """ Load the specified file and parse it as JSON. Args: path: Path to a file containing JSON-encoded data. encoding: Encoding used in the file. Defaults to utf-8. Returns: A Python object representing the data encoded in the file. Raises: Exception: If the file could not...
476,371
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
476,372
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
476,373
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
476,374
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
def main(argv): try: files = FLAGS(argv) # Parse flags except gflags.FlagsError, e: print '%s.\nUsage: %s [<options>] [<input_file> <output_file>]\n%s' % \ (e, sys.argv[0], FLAGS) sys.exit(1) # Strip off argv[0] files = files[1:] # Get version string from o3d_version.py o3d_version_vars = {} if FLAGS.kill_switch: ex...
476,375
def Analyze(self, log_lines, check_sanity=False): """Analyzes the app's output and applies suppressions to the reports.
defif not cur_leak_signature: print 'Missing leak signature for the following stack: ' for frame in cur_stack: print ' ' + frame print 'Aborting...' return 3 Analyze(self,if not cur_leak_signature: print 'Missing leak signature for the following stack: ' for frame in cur_stack: print ' ' + frame print 'Aborting......
476,376
def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name)
def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name)
476,377
def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name)
def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name)
476,378
def EchoAllHandler(self): """This handler yields a (more) human-readable page listing information about the request header & contents."""
def EchoAllHandler(self): """This handler yields a (more) human-readable page listing information about the request header & contents."""
476,379
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,380
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,381
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
deflisten_port = server.server_port main(options,listen_port = server.server_port args):listen_port = server.server_port logfilelisten_port = server.server_port =listen_port = server.server_port open('testserver.log',listen_port = server.server_port 'w')listen_port = server.server_port sys.stdoutlisten_port = server.se...
476,382
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,383
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,384
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,385
def __init__(self, options): self._options = options
def __init__(self, options): self._options = options
476,386
def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') downloaded_pkg = os.path.joi...
def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory, in first tab first window. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') d...
476,387
def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ download_dir = os.path.join(os.path.abspath(test.DataDir()), 'downloads') downloaded_pkg = os.path.joi...
def DownloadFileFromDownloadsDataDir(test, file_name): """Download a file from downloads data directory. Args: test: derived from pyauto.PyUITest - base class for UI test cases file_name: name of file to download """ file_url = test.GetFileURLForDataPath(os.path.join('downloads', file_name)) downloaded_pkg = os.path.j...
476,388
def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id.
def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id.
476,389
def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id.
def _CancelNotification(self, notification_id, tab_index=0, windex=0): """Cancels a notification with the given id.
476,390
def testCreateSimpleNotification(self): """Creates a simple notification.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateSimpleNotification('no_such_file.png', 'My Title', 'My Body') self.assertEquals(len(self.GetActiveNotifications()), 1) notification = self.GetActiveNotifications()[0] h...
def testCreateSimpleNotification(self): """Creates a simple notification.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateSimpleNotification('no_such_file.png', 'My Title', 'My Body') self.assertEquals(1, len(self.GetActiveNotifications())) notification = self.GetActiveNotifications()[0] h...
476,391
def testCreateHTMLNotification(self): """Creates an HTML notification using a fake url.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(len(self.GetActiveNotifications()), 1) notification = self.GetActiveNotifications()[0] self.assertEqu...
def testCreateHTMLNotification(self): """Creates an HTML notification using a fake url.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(1, len(self.GetActiveNotifications())) notification = self.GetActiveNotifications()[0] self.assertEqu...
476,392
def testCloseNotification(self): """Creates a notification and closes it.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.CloseNotification(0) self.assertEquals(len(self.GetActiveNotifications()), 0)
def testCloseNotification(self): """Creates a notification and closes it.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) self._CreateHTMLNotification(self.NO_SUCH_URL) self.CloseNotification(0) self.assertEquals(len(self.GetActiveNotifications()), 0)
476,393
def testCancelNotification(self): """Creates a notification and cancels it in the origin page.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) note_id = self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertNotEquals(-1, note_id) self._CancelNotification(note_id) self.assertEquals(len(self.GetActi...
def testCancelNotification(self): """Creates a notification and cancels it in the origin page.""" self._AllowAllOrigins() self.NavigateToURL(self.TEST_PAGE_URL) note_id = self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertNotEquals(-1, note_id) self._CancelNotification(note_id) self.assertEquals(len(self.GetActi...
476,394
def testPermissionInfobarAppears(self): """Requests notification privileges and verifies the infobar appears.""" self.NavigateToURL(self.TEST_PAGE_URL) self._RequestPermission() self.assertTrue(self.WaitForInfobarCount(1)) self.assertEquals(len(self.GetActiveNotifications()), 0) self._VerifyInfobar('') # file:/// orig...
def testPermissionInfobarAppears(self): """Requests notification privileges and verifies the infobar appears.""" self.NavigateToURL(self.TEST_PAGE_URL) self._RequestPermission() self.assertTrue(self.WaitForInfobarCount(1)) self.assertFalse(self.GetActiveNotifications()) self._VerifyInfobar('') # file:/// origins are b...
476,395
def testAllowOnPermissionInfobar(self): """Tries to create a notification and clicks allow on the infobar.""" self.NavigateToURL(self.TEST_PAGE_URL) # This notification should not be shown because we don't have permission. self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(len(self.GetActiveNotifications(...
def testAllowOnPermissionInfobar(self): """Tries to create a notification and clicks allow on the infobar.""" self.NavigateToURL(self.TEST_PAGE_URL) # This notification should not be shown because we don't have permission. self._CreateHTMLNotification(self.NO_SUCH_URL) self.assertEquals(len(self.GetActiveNotifications(...
476,396
def __init__(self, server_address, request_hander_class, cert_path, ssl_client_auth, ssl_client_cas): s = open(cert_path).read() x509 = tlslite.api.X509() x509.parse(s) self.cert_chain = tlslite.api.X509CertChain([x509]) s = open(cert_path).read() self.private_key = tlslite.api.parsePEMKey(s, private=True) self.ssl_cli...
def __init__(self, server_address, request_hander_class, cert_path, ssl_client_auth, ssl_client_cas, ssl_bulk_ciphers): s = open(cert_path).read() x509 = tlslite.api.X509() x509.parse(s) self.cert_chain = tlslite.api.X509CertChain([x509]) s = open(cert_path).read() self.private_key = tlslite.api.parsePEMKey(s, private=...
476,397
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,398
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): pr...
476,399