Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3438fa49
Commit
3438fa49
authored
Dec 17, 2012
by
Andrew Svetlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rig of EnvironmentError (#16705)
parent
6eda46de
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
34 additions
and
35 deletions
+34
-35
Lib/compileall.py
Lib/compileall.py
+1
-1
Lib/getpass.py
Lib/getpass.py
+1
-1
Lib/mimetypes.py
Lib/mimetypes.py
+2
-2
Lib/shutil.py
Lib/shutil.py
+5
-5
Lib/subprocess.py
Lib/subprocess.py
+2
-2
Lib/tarfile.py
Lib/tarfile.py
+4
-4
Lib/test/test_exceptions.py
Lib/test/test_exceptions.py
+3
-3
Lib/test/test_fileio.py
Lib/test/test_fileio.py
+1
-1
Lib/test/test_io.py
Lib/test/test_io.py
+1
-1
Lib/test/test_signal.py
Lib/test/test_signal.py
+1
-1
Lib/test/test_subprocess.py
Lib/test/test_subprocess.py
+3
-4
Lib/test/test_tarfile.py
Lib/test/test_tarfile.py
+2
-2
Lib/test/test_tempfile.py
Lib/test/test_tempfile.py
+1
-1
Lib/test/test_urllib2net.py
Lib/test/test_urllib2net.py
+1
-1
Lib/test/test_winreg.py
Lib/test/test_winreg.py
+5
-5
Lib/urllib/request.py
Lib/urllib/request.py
+1
-1
No files found.
Lib/compileall.py
View file @
3438fa49
...
@@ -209,7 +209,7 @@ def main():
...
@@ -209,7 +209,7 @@ def main():
with
(
sys
.
stdin
if
args
.
flist
==
'-'
else
open
(
args
.
flist
))
as
f
:
with
(
sys
.
stdin
if
args
.
flist
==
'-'
else
open
(
args
.
flist
))
as
f
:
for
line
in
f
:
for
line
in
f
:
compile_dests
.
append
(
line
.
strip
())
compile_dests
.
append
(
line
.
strip
())
except
Environment
Error
:
except
OS
Error
:
print
(
"Error reading file list {}"
.
format
(
args
.
flist
))
print
(
"Error reading file list {}"
.
format
(
args
.
flist
))
return
False
return
False
...
...
Lib/getpass.py
View file @
3438fa49
...
@@ -47,7 +47,7 @@ def unix_getpass(prompt='Password: ', stream=None):
...
@@ -47,7 +47,7 @@ def unix_getpass(prompt='Password: ', stream=None):
input
=
tty
input
=
tty
if
not
stream
:
if
not
stream
:
stream
=
tty
stream
=
tty
except
Environment
Error
as
e
:
except
OS
Error
as
e
:
# If that fails, see if stdin can be controlled.
# If that fails, see if stdin can be controlled.
try
:
try
:
fd
=
sys
.
stdin
.
fileno
()
fd
=
sys
.
stdin
.
fileno
()
...
...
Lib/mimetypes.py
View file @
3438fa49
...
@@ -243,7 +243,7 @@ class MimeTypes:
...
@@ -243,7 +243,7 @@ class MimeTypes:
while
True
:
while
True
:
try
:
try
:
ctype
=
_winreg
.
EnumKey
(
mimedb
,
i
)
ctype
=
_winreg
.
EnumKey
(
mimedb
,
i
)
except
Environment
Error
:
except
OS
Error
:
break
break
else
:
else
:
yield
ctype
yield
ctype
...
@@ -256,7 +256,7 @@ class MimeTypes:
...
@@ -256,7 +256,7 @@ class MimeTypes:
with
_winreg
.
OpenKey
(
mimedb
,
ctype
)
as
key
:
with
_winreg
.
OpenKey
(
mimedb
,
ctype
)
as
key
:
suffix
,
datatype
=
_winreg
.
QueryValueEx
(
key
,
suffix
,
datatype
=
_winreg
.
QueryValueEx
(
key
,
'Extension'
)
'Extension'
)
except
Environment
Error
:
except
OS
Error
:
continue
continue
if
datatype
!=
_winreg
.
REG_SZ
:
if
datatype
!=
_winreg
.
REG_SZ
:
continue
continue
...
...
Lib/shutil.py
View file @
3438fa49
...
@@ -39,20 +39,20 @@ __all__ = ["copyfileobj", "copyfile", "copymode", "copystat", "copy", "copy2",
...
@@ -39,20 +39,20 @@ __all__ = ["copyfileobj", "copyfile", "copymode", "copystat", "copy", "copy2",
"ignore_patterns"
,
"chown"
,
"which"
]
"ignore_patterns"
,
"chown"
,
"which"
]
# disk_usage is added later, if available on the platform
# disk_usage is added later, if available on the platform
class
Error
(
Environment
Error
):
class
Error
(
OS
Error
):
pass
pass
class
SameFileError
(
Error
):
class
SameFileError
(
Error
):
"""Raised when source and destination are the same file."""
"""Raised when source and destination are the same file."""
class
SpecialFileError
(
Environment
Error
):
class
SpecialFileError
(
OS
Error
):
"""Raised when trying to do a kind of operation (e.g. copying) which is
"""Raised when trying to do a kind of operation (e.g. copying) which is
not supported on a special file (e.g. a named pipe)"""
not supported on a special file (e.g. a named pipe)"""
class
ExecError
(
Environment
Error
):
class
ExecError
(
OS
Error
):
"""Raised when a command could not be executed"""
"""Raised when a command could not be executed"""
class
ReadError
(
Environment
Error
):
class
ReadError
(
OS
Error
):
"""Raised when an archive cannot be read"""
"""Raised when an archive cannot be read"""
class
RegistryError
(
Exception
):
class
RegistryError
(
Exception
):
...
@@ -329,7 +329,7 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
...
@@ -329,7 +329,7 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
# continue with other files
# continue with other files
except
Error
as
err
:
except
Error
as
err
:
errors
.
extend
(
err
.
args
[
0
])
errors
.
extend
(
err
.
args
[
0
])
except
Environment
Error
as
why
:
except
OS
Error
as
why
:
errors
.
append
((
srcname
,
dstname
,
str
(
why
)))
errors
.
append
((
srcname
,
dstname
,
str
(
why
)))
try
:
try
:
copystat
(
src
,
dst
)
copystat
(
src
,
dst
)
...
...
Lib/subprocess.py
View file @
3438fa49
...
@@ -819,7 +819,7 @@ class Popen(object):
...
@@ -819,7 +819,7 @@ class Popen(object):
for
f
in
filter
(
None
,
(
self
.
stdin
,
self
.
stdout
,
self
.
stderr
)):
for
f
in
filter
(
None
,
(
self
.
stdin
,
self
.
stdout
,
self
.
stderr
)):
try
:
try
:
f
.
close
()
f
.
close
()
except
Environment
Error
:
except
OS
Error
:
pass
# Ignore EBADF or other errors.
pass
# Ignore EBADF or other errors.
# Make sure the child pipes are closed as well.
# Make sure the child pipes are closed as well.
...
@@ -833,7 +833,7 @@ class Popen(object):
...
@@ -833,7 +833,7 @@ class Popen(object):
for
fd
in
to_close
:
for
fd
in
to_close
:
try
:
try
:
os
.
close
(
fd
)
os
.
close
(
fd
)
except
Environment
Error
:
except
OS
Error
:
pass
pass
raise
raise
...
...
Lib/tarfile.py
View file @
3438fa49
...
@@ -2022,7 +2022,7 @@ class TarFile(object):
...
@@ -2022,7 +2022,7 @@ class TarFile(object):
try:
try:
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
set_attrs=set_attrs)
set_attrs=set_attrs)
except
Environment
Error as e:
except
OS
Error as e:
if self.errorlevel > 0:
if self.errorlevel > 0:
raise
raise
else:
else:
...
@@ -2212,7 +2212,7 @@ class TarFile(object):
...
@@ -2212,7 +2212,7 @@ class TarFile(object):
os.lchown(targetpath, u, g)
os.lchown(targetpath, u, g)
else:
else:
os.chown(targetpath, u, g)
os.chown(targetpath, u, g)
except
Environment
Error as e:
except
OS
Error as e:
raise ExtractError("
could
not
change
owner
")
raise ExtractError("
could
not
change
owner
")
def chmod(self, tarinfo, targetpath):
def chmod(self, tarinfo, targetpath):
...
@@ -2221,7 +2221,7 @@ class TarFile(object):
...
@@ -2221,7 +2221,7 @@ class TarFile(object):
if hasattr(os, 'chmod'):
if hasattr(os, 'chmod'):
try:
try:
os.chmod(targetpath, tarinfo.mode)
os.chmod(targetpath, tarinfo.mode)
except
Environment
Error as e:
except
OS
Error as e:
raise ExtractError("
could
not
change
mode
")
raise ExtractError("
could
not
change
mode
")
def utime(self, tarinfo, targetpath):
def utime(self, tarinfo, targetpath):
...
@@ -2231,7 +2231,7 @@ class TarFile(object):
...
@@ -2231,7 +2231,7 @@ class TarFile(object):
return
return
try:
try:
os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
except
Environment
Error as e:
except
OS
Error as e:
raise ExtractError("
could
not
change
modification
time
")
raise ExtractError("
could
not
change
modification
time
")
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
...
...
Lib/test/test_exceptions.py
View file @
3438fa49
...
@@ -255,11 +255,11 @@ class ExceptionTests(unittest.TestCase):
...
@@ -255,11 +255,11 @@ class ExceptionTests(unittest.TestCase):
'errno'
:
'foo'
,
'strerror'
:
'bar'
}),
'errno'
:
'foo'
,
'strerror'
:
'bar'
}),
(
IOError
,
(
'foo'
,
'bar'
,
'baz'
,
'quux'
),
(
IOError
,
(
'foo'
,
'bar'
,
'baz'
,
'quux'
),
{
'args'
:
(
'foo'
,
'bar'
,
'baz'
,
'quux'
)}),
{
'args'
:
(
'foo'
,
'bar'
,
'baz'
,
'quux'
)}),
(
Environment
Error
,
(
'errnoStr'
,
'strErrorStr'
,
'filenameStr'
),
(
OS
Error
,
(
'errnoStr'
,
'strErrorStr'
,
'filenameStr'
),
{
'args'
:
(
'errnoStr'
,
'strErrorStr'
),
{
'args'
:
(
'errnoStr'
,
'strErrorStr'
),
'strerror'
:
'strErrorStr'
,
'errno'
:
'errnoStr'
,
'strerror'
:
'strErrorStr'
,
'errno'
:
'errnoStr'
,
'filename'
:
'filenameStr'
}),
'filename'
:
'filenameStr'
}),
(
Environment
Error
,
(
1
,
'strErrorStr'
,
'filenameStr'
),
(
OS
Error
,
(
1
,
'strErrorStr'
,
'filenameStr'
),
{
'args'
:
(
1
,
'strErrorStr'
),
'errno'
:
1
,
{
'args'
:
(
1
,
'strErrorStr'
),
'errno'
:
1
,
'strerror'
:
'strErrorStr'
,
'filename'
:
'filenameStr'
}),
'strerror'
:
'strErrorStr'
,
'filename'
:
'filenameStr'
}),
(
SyntaxError
,
(),
{
'msg'
:
None
,
'text'
:
None
,
(
SyntaxError
,
(),
{
'msg'
:
None
,
'text'
:
None
,
...
@@ -409,7 +409,7 @@ class ExceptionTests(unittest.TestCase):
...
@@ -409,7 +409,7 @@ class ExceptionTests(unittest.TestCase):
self
.
assertIsNone
(
e
.
__context__
)
self
.
assertIsNone
(
e
.
__context__
)
self
.
assertIsNone
(
e
.
__cause__
)
self
.
assertIsNone
(
e
.
__cause__
)
class
MyException
(
Environment
Error
):
class
MyException
(
OS
Error
):
pass
pass
e
=
MyException
()
e
=
MyException
()
...
...
Lib/test/test_fileio.py
View file @
3438fa49
...
@@ -285,7 +285,7 @@ class OtherFileTests(unittest.TestCase):
...
@@ -285,7 +285,7 @@ class OtherFileTests(unittest.TestCase):
if
sys
.
platform
!=
"win32"
:
if
sys
.
platform
!=
"win32"
:
try
:
try
:
f
=
_FileIO
(
"/dev/tty"
,
"a"
)
f
=
_FileIO
(
"/dev/tty"
,
"a"
)
except
Environment
Error
:
except
OS
Error
:
# When run in a cron job there just aren't any
# When run in a cron job there just aren't any
# ttys, so skip the test. This also handles other
# ttys, so skip the test. This also handles other
# OS'es that don't support /dev/tty.
# OS'es that don't support /dev/tty.
...
...
Lib/test/test_io.py
View file @
3438fa49
...
@@ -2825,7 +2825,7 @@ class MiscIOTest(unittest.TestCase):
...
@@ -2825,7 +2825,7 @@ class MiscIOTest(unittest.TestCase):
for
fd
in
fds
:
for
fd
in
fds
:
try
:
try
:
os
.
close
(
fd
)
os
.
close
(
fd
)
except
Environment
Error
as
e
:
except
OS
Error
as
e
:
if
e
.
errno
!=
errno
.
EBADF
:
if
e
.
errno
!=
errno
.
EBADF
:
raise
raise
self
.
addCleanup
(
cleanup_fds
)
self
.
addCleanup
(
cleanup_fds
)
...
...
Lib/test/test_signal.py
View file @
3438fa49
...
@@ -33,7 +33,7 @@ def exit_subprocess():
...
@@ -33,7 +33,7 @@ def exit_subprocess():
def
ignoring_eintr
(
__func
,
*
args
,
**
kwargs
):
def
ignoring_eintr
(
__func
,
*
args
,
**
kwargs
):
try
:
try
:
return
__func
(
*
args
,
**
kwargs
)
return
__func
(
*
args
,
**
kwargs
)
except
Environment
Error
as
e
:
except
OS
Error
as
e
:
if
e
.
errno
!=
errno
.
EINTR
:
if
e
.
errno
!=
errno
.
EINTR
:
raise
raise
return
None
return
None
...
...
Lib/test/test_subprocess.py
View file @
3438fa49
...
@@ -925,8 +925,7 @@ class ProcessTestCase(BaseTestCase):
...
@@ -925,8 +925,7 @@ class ProcessTestCase(BaseTestCase):
# value for that limit, but Windows has 2048, so we loop
# value for that limit, but Windows has 2048, so we loop
# 1024 times (each call leaked two fds).
# 1024 times (each call leaked two fds).
for
i
in
range
(
1024
):
for
i
in
range
(
1024
):
# Windows raises IOError. Others raise OSError.
with
self
.
assertRaises
(
OSError
)
as
c
:
with
self
.
assertRaises
(
EnvironmentError
)
as
c
:
subprocess
.
Popen
([
'nonexisting_i_hope'
],
subprocess
.
Popen
([
'nonexisting_i_hope'
],
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stderr
=
subprocess
.
PIPE
)
...
@@ -1874,7 +1873,7 @@ class POSIXProcessTestCase(BaseTestCase):
...
@@ -1874,7 +1873,7 @@ class POSIXProcessTestCase(BaseTestCase):
# let some time for the process to exit, and create a new Popen: this
# let some time for the process to exit, and create a new Popen: this
# should trigger the wait() of p
# should trigger the wait() of p
time
.
sleep
(
0.2
)
time
.
sleep
(
0.2
)
with
self
.
assertRaises
(
Environment
Error
)
as
c
:
with
self
.
assertRaises
(
OS
Error
)
as
c
:
with
subprocess
.
Popen
([
'nonexisting_i_hope'
],
with
subprocess
.
Popen
([
'nonexisting_i_hope'
],
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
as
proc
:
stderr
=
subprocess
.
PIPE
)
as
proc
:
...
@@ -2155,7 +2154,7 @@ class ContextManagerTests(BaseTestCase):
...
@@ -2155,7 +2154,7 @@ class ContextManagerTests(BaseTestCase):
self
.
assertEqual
(
proc
.
returncode
,
1
)
self
.
assertEqual
(
proc
.
returncode
,
1
)
def
test_invalid_args
(
self
):
def
test_invalid_args
(
self
):
with
self
.
assertRaises
(
Environment
Error
)
as
c
:
with
self
.
assertRaises
(
OS
Error
)
as
c
:
with
subprocess
.
Popen
([
'nonexisting_i_hope'
],
with
subprocess
.
Popen
([
'nonexisting_i_hope'
],
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
as
proc
:
stderr
=
subprocess
.
PIPE
)
as
proc
:
...
...
Lib/test/test_tarfile.py
View file @
3438fa49
...
@@ -342,7 +342,7 @@ class MiscReadTest(CommonReadTest):
...
@@ -342,7 +342,7 @@ class MiscReadTest(CommonReadTest):
tar
.
extract
(
"ustar/regtype"
,
TEMPDIR
)
tar
.
extract
(
"ustar/regtype"
,
TEMPDIR
)
try
:
try
:
tar
.
extract
(
"ustar/lnktype"
,
TEMPDIR
)
tar
.
extract
(
"ustar/lnktype"
,
TEMPDIR
)
except
Environment
Error
as
e
:
except
OS
Error
as
e
:
if
e
.
errno
==
errno
.
ENOENT
:
if
e
.
errno
==
errno
.
ENOENT
:
self
.
fail
(
"hardlink not extracted properly"
)
self
.
fail
(
"hardlink not extracted properly"
)
...
@@ -352,7 +352,7 @@ class MiscReadTest(CommonReadTest):
...
@@ -352,7 +352,7 @@ class MiscReadTest(CommonReadTest):
try
:
try
:
tar
.
extract
(
"ustar/symtype"
,
TEMPDIR
)
tar
.
extract
(
"ustar/symtype"
,
TEMPDIR
)
except
Environment
Error
as
e
:
except
OS
Error
as
e
:
if
e
.
errno
==
errno
.
ENOENT
:
if
e
.
errno
==
errno
.
ENOENT
:
self
.
fail
(
"symlink not extracted properly"
)
self
.
fail
(
"symlink not extracted properly"
)
...
...
Lib/test/test_tempfile.py
View file @
3438fa49
...
@@ -149,7 +149,7 @@ class TestRandomNameSequence(BaseTestCase):
...
@@ -149,7 +149,7 @@ class TestRandomNameSequence(BaseTestCase):
# via any bugs above
# via any bugs above
try
:
try
:
os
.
kill
(
pid
,
signal
.
SIGKILL
)
os
.
kill
(
pid
,
signal
.
SIGKILL
)
except
Environment
Error
:
except
OS
Error
:
pass
pass
os
.
close
(
read_fd
)
os
.
close
(
read_fd
)
os
.
close
(
write_fd
)
os
.
close
(
write_fd
)
...
...
Lib/test/test_urllib2net.py
View file @
3438fa49
...
@@ -216,7 +216,7 @@ class OtherNetworkTests(unittest.TestCase):
...
@@ -216,7 +216,7 @@ class OtherNetworkTests(unittest.TestCase):
debug
(
url
)
debug
(
url
)
try
:
try
:
f
=
urlopen
(
url
,
req
,
TIMEOUT
)
f
=
urlopen
(
url
,
req
,
TIMEOUT
)
except
Environment
Error
as
err
:
except
OS
Error
as
err
:
debug
(
err
)
debug
(
err
)
if
expected_err
:
if
expected_err
:
msg
=
(
"Didn't get expected error(s) %s for %s %s, got %s: %s"
%
msg
=
(
"Didn't get expected error(s) %s for %s %s, got %s: %s"
%
...
...
Lib/test/test_winreg.py
View file @
3438fa49
...
@@ -97,7 +97,7 @@ class BaseWinregTests(unittest.TestCase):
...
@@ -97,7 +97,7 @@ class BaseWinregTests(unittest.TestCase):
QueryInfoKey
(
int_sub_key
)
QueryInfoKey
(
int_sub_key
)
self
.
fail
(
"It appears the CloseKey() function does "
self
.
fail
(
"It appears the CloseKey() function does "
"not close the actual key!"
)
"not close the actual key!"
)
except
Environment
Error
:
except
OS
Error
:
pass
pass
# ... and close that key that way :-)
# ... and close that key that way :-)
int_key
=
int
(
key
)
int_key
=
int
(
key
)
...
@@ -106,7 +106,7 @@ class BaseWinregTests(unittest.TestCase):
...
@@ -106,7 +106,7 @@ class BaseWinregTests(unittest.TestCase):
QueryInfoKey
(
int_key
)
QueryInfoKey
(
int_key
)
self
.
fail
(
"It appears the key.Close() function "
self
.
fail
(
"It appears the key.Close() function "
"does not close the actual key!"
)
"does not close the actual key!"
)
except
Environment
Error
:
except
OS
Error
:
pass
pass
def
_read_test_data
(
self
,
root_key
,
subkeystr
=
"sub_key"
,
OpenKey
=
OpenKey
):
def
_read_test_data
(
self
,
root_key
,
subkeystr
=
"sub_key"
,
OpenKey
=
OpenKey
):
...
@@ -123,7 +123,7 @@ class BaseWinregTests(unittest.TestCase):
...
@@ -123,7 +123,7 @@ class BaseWinregTests(unittest.TestCase):
while
1
:
while
1
:
try
:
try
:
data
=
EnumValue
(
sub_key
,
index
)
data
=
EnumValue
(
sub_key
,
index
)
except
Environment
Error
:
except
OS
Error
:
break
break
self
.
assertEqual
(
data
in
test_data
,
True
,
self
.
assertEqual
(
data
in
test_data
,
True
,
"Didn't read back the correct test data"
)
"Didn't read back the correct test data"
)
...
@@ -144,7 +144,7 @@ class BaseWinregTests(unittest.TestCase):
...
@@ -144,7 +144,7 @@ class BaseWinregTests(unittest.TestCase):
try
:
try
:
EnumKey
(
key
,
1
)
EnumKey
(
key
,
1
)
self
.
fail
(
"Was able to get a second key when I only have one!"
)
self
.
fail
(
"Was able to get a second key when I only have one!"
)
except
Environment
Error
:
except
OS
Error
:
pass
pass
key
.
Close
()
key
.
Close
()
...
@@ -168,7 +168,7 @@ class BaseWinregTests(unittest.TestCase):
...
@@ -168,7 +168,7 @@ class BaseWinregTests(unittest.TestCase):
# Shouldnt be able to delete it twice!
# Shouldnt be able to delete it twice!
DeleteKey
(
key
,
subkeystr
)
DeleteKey
(
key
,
subkeystr
)
self
.
fail
(
"Deleting the key twice succeeded"
)
self
.
fail
(
"Deleting the key twice succeeded"
)
except
Environment
Error
:
except
OS
Error
:
pass
pass
key
.
Close
()
key
.
Close
()
DeleteKey
(
root_key
,
test_key_name
)
DeleteKey
(
root_key
,
test_key_name
)
...
...
Lib/urllib/request.py
View file @
3438fa49
...
@@ -232,7 +232,7 @@ def urlcleanup():
...
@@ -232,7 +232,7 @@ def urlcleanup():
for
temp_file
in
_url_tempfiles
:
for
temp_file
in
_url_tempfiles
:
try
:
try
:
os
.
unlink
(
temp_file
)
os
.
unlink
(
temp_file
)
except
Environment
Error
:
except
OS
Error
:
pass
pass
del
_url_tempfiles
[:]
del
_url_tempfiles
[:]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment