diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-05-07 13:23:42 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-05-07 13:23:42 (GMT) |
commit | ad34ef8640dfed63d84d0e71d7f75308cf28641f (patch) | |
tree | d37bfba3d4ae754c1972dc4c8f0e3565cd5fe1df /Lib/os.py | |
parent | 577abe161d89a8e17bf7a82981709979a802416f (diff) | |
download | cpython-ad34ef8640dfed63d84d0e71d7f75308cf28641f.zip cpython-ad34ef8640dfed63d84d0e71d7f75308cf28641f.tar.gz cpython-ad34ef8640dfed63d84d0e71d7f75308cf28641f.tar.bz2 |
Fix os.__all__ to is passes test___all__
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -686,19 +686,16 @@ class _Environ(MutableMapping): self[key] = value return self[key] +# if putenv or unsetenv exist they should already be in __all__ try: _putenv = putenv except NameError: _putenv = lambda key, value: None -else: - __all__.append("putenv") try: _unsetenv = unsetenv except NameError: _unsetenv = lambda key: _putenv(key, "") -else: - __all__.append("unsetenv") def _createenviron(): if name == 'nt': @@ -883,6 +880,10 @@ If mode == P_WAIT return the process's exit code if it exits normally; otherwise return -SIG, where SIG is the signal that killed it. """ return _spawnvef(mode, file, args, env, execvpe) + + __all__.extend(["spawnv", "spawnve", "spawnvp", "spawnvpe"]) + + if _exists("spawnv"): # These aren't supplied by the basic Windows code # but can be easily implemented in Python @@ -908,7 +909,7 @@ otherwise return -SIG, where SIG is the signal that killed it. """ return spawnve(mode, file, args[:-1], env) - __all__.extend(["spawnv", "spawnve", "spawnl", "spawnle",]) + __all__.extend(["spawnl", "spawnle"]) if _exists("spawnvp"): @@ -936,7 +937,8 @@ otherwise return -SIG, where SIG is the signal that killed it. """ return spawnvpe(mode, file, args[:-1], env) - __all__.extend(["spawnvp", "spawnvpe", "spawnlp", "spawnlpe",]) + __all__.extend(["spawnlp", "spawnlpe"]) + import copyreg as _copyreg |