SeleniumHQ/selenium — pull request #176 by jmuramatsu (2014-02-28 22:31:26+00:00)
Title: webdriver.py: fix service_args[] handling

currently webdriver uses the passed in service_args[] to start phantomjs without making a local copy of the list. When the service object is created, it appends data to service_args, which unintentionally modifies the initial list passed in upon instantiation of the webdriver. this is poor in two respects -- the user of the library does NOT expect their passed in parameter to be modified and also this current behavior interferes with creating more than one instance of webdriver in a python script.

The fix is to create a local copy of service_args and pass that local copy to service.
so ... service_args=service_args[:]