@@ -545,8 +545,9 @@ def tvos_ver(system="", release="", model="", is_simulator=False):
545545 if sys .platform == "tvos" :
546546 # TODO: Can the iOS implementation be used here?
547547 import _ios_support
548- result = _ios_support .get_platform_ios ()[: - 1 ] # ignore the Catalyst flag
548+ result = _ios_support .get_platform_ios ()
549549 if result is not None :
550+ result = result [:- 1 ] # ignore the Catalyst flag
550551 return TVOSVersionInfo (* result )
551552
552553 return TVOSVersionInfo (system , release , model , is_simulator )
@@ -569,8 +570,9 @@ def watchos_ver(system="", release="", model="", is_simulator=False):
569570 if sys .platform == "watchos" :
570571 # TODO: Can the iOS implementation be used here?
571572 import _ios_support
572- result = _ios_support .get_platform_ios ()[: - 1 ] # ignore the Catalyst flag
573+ result = _ios_support .get_platform_ios ()
573574 if result is not None :
575+ result = result [:- 1 ] # ignore the Catalyst flag
574576 return WatchOSVersionInfo (* result )
575577
576578 return WatchOSVersionInfo (system , release , model , is_simulator )
@@ -593,8 +595,9 @@ def visionos_ver(system="", release="", model="", is_simulator=False):
593595 if sys .platform == "visionos" :
594596 # TODO: Can the iOS implementation be used here?
595597 import _ios_support
596- result = _ios_support .get_platform_ios ()[: - 1 ] # ignore the Catalyst flag
598+ result = _ios_support .get_platform_ios ()
597599 if result is not None :
600+ result = result [:- 1 ] # ignore the Catalyst flag
598601 return VisionOSVersionInfo (* result )
599602
600603 return VisionOSVersionInfo (system , release , model , is_simulator )
0 commit comments