Changeset 179716 in webkit


Ignore:
Timestamp:
Feb 5, 2015 3:15:30 PM (9 years ago)
Author:
dbates@webkit.org
Message:

[iOS] webkitpy.xcode.simulator.Runtime.from_identifier() returns wrong result for non-existent runtime
https://bugs.webkit.org/show_bug.cgi?id=141306

Reviewed by Alexey Proskuryakov.

The function webkitpy.xcode.simulator.Runtime.from_identifier always returns a Runtime object
corresponding to the last-most runtime parsed from the output of simctl list for any non-
existent runtime.

  • Scripts/webkitpy/xcode/simulator.py:

(Runtime.from_identifier):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r179712 r179716  
     12015-02-05  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] webkitpy.xcode.simulator.Runtime.from_identifier() returns wrong result for non-existent runtime
     4        https://bugs.webkit.org/show_bug.cgi?id=141306
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        The function webkitpy.xcode.simulator.Runtime.from_identifier always returns a Runtime object
     9        corresponding to the last-most runtime parsed from the output of `simctl list` for any non-
     10        existent runtime.
     11
     12        * Scripts/webkitpy/xcode/simulator.py:
     13        (Runtime.from_identifier):
     14
    1152015-02-05  Daniel Bates  <dabates@apple.com>
    216
  • trunk/Tools/Scripts/webkitpy/xcode/simulator.py

    r179712 r179716  
    111111        :rtype: Runtime
    112112        """
    113         runtime = None
    114113        for runtime in Simulator().runtimes:
    115114            if runtime.identifier == identifier:
    116                 break
    117         if runtime is None:
    118             raise TypeError('A runtime with identifier "{identifier}" does not exist.'.format(identifier=identifier))
    119         return runtime
     115                return runtime
     116        raise TypeError('A runtime with identifier "{identifier}" does not exist.'.format(identifier=identifier))
    120117
    121118    def __eq__(self, other):
Note: See TracChangeset for help on using the changeset viewer.