Support named attributes in os.uname() result (#1445)

`os.uname` changed in version 3.3: Return type changed from a tuple to
a tuple-like object with named attributes.
This commit is contained in:
Rhys Parry
2017-06-30 21:58:44 -07:00
committed by Jelle Zijlstra
parent bc9b2f0d4d
commit 683c6e90a0
2 changed files with 11 additions and 1 deletions

View File

@@ -2,5 +2,11 @@
# NOTE: These are incomplete!
import sys
import typing
from os import stat_result
from typing import NamedTuple
if sys.version_info >= (3, 3):
uname_result = NamedTuple('uname_result', [('sysname', str), ('nodename', str),
('release', str), ('version', str), ('machine', str)])