summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 6a92a10..32bb87e 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1505,7 +1505,8 @@ class TarFile(object):
if tarinfo.issym() and hasattr(os, "lchown"):
os.lchown(targetpath, u, g)
else:
- os.chown(targetpath, u, g)
+ if sys.platform != "os2emx":
+ os.chown(targetpath, u, g)
except EnvironmentError, e:
raise ExtractError, "could not change owner"