summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-03-07 09:05:45 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-03-07 09:05:45 (GMT)
commita90f438d4a4514f4dc0b5626762ee303181cc756 (patch)
tree403d33b1f7183c10667c3be7eaad603fb6f221f5 /Lib/os.py
parent1d79f79bd08df49701fc92640b013362dd97f45a (diff)
downloadcpython-a90f438d4a4514f4dc0b5626762ee303181cc756.zip
cpython-a90f438d4a4514f4dc0b5626762ee303181cc756.tar.gz
cpython-a90f438d4a4514f4dc0b5626762ee303181cc756.tar.bz2
Unify _Environ processing on riscos with other platforms.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 367ea72..64caee6 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -160,7 +160,6 @@ elif 'riscos' in _names:
import riscospath
path = riscospath
del riscospath
- from riscosenviron import environ
import riscos
__all__.extend(_get_exports_list(riscos))
@@ -346,17 +345,19 @@ def _execvpe(file, args, env=None):
raise exc, arg
-if name != "riscos":
- # Change environ to automatically call putenv() if it exists
- try:
- # This will fail if there's no putenv
- putenv
- except NameError:
- pass
- else:
- import UserDict
+# Change environ to automatically call putenv() if it exists
+try:
+ # This will fail if there's no putenv
+ putenv
+except NameError:
+ pass
+else:
+ import UserDict
- if name in ('os2', 'nt', 'dos'): # Where Env Var Names Must Be UPPERCASE
+ if name == "riscos":
+ # On RISC OS, all env access goes through getenv and putenv
+ from riscosenviron import _Environ
+ elif name in ('os2', 'nt', 'dos'): # Where Env Var Names Must Be UPPERCASE
# But we store them as upper case
class _Environ(UserDict.UserDict):
def __init__(self, environ):