Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
isaak yansane-sisk
slapos.buildout
Commits
edf5d873
Commit
edf5d873
authored
Jul 18, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed an unneeded example that caused a spurious test failure on
non-windows systems.
parent
422d4394
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
src/zc/buildout/rmtree.py
src/zc/buildout/rmtree.py
+6
-12
No files found.
src/zc/buildout/rmtree.py
View file @
edf5d873
...
...
@@ -24,38 +24,32 @@ def rmtree (path):
read only file.
This tries to chmod the file to writeable and retries before giving up.
>>> import shutil
>>> from tempfile import mkdtemp
Let's make a directory ...
>>> d = mkdtemp()
and make sure it is actually there
>>> os.path.isdir (d)
1
Now create a file ...
>>> foo = os.path.join (d, 'foo')
>>> open (foo, 'w').write ('huhu')
and make it unwriteable
>>> os.chmod (foo, 0400)
now let's see how shutil.rmtree behaves
>>> shutil.rmtree (d) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
OSError: [Errno 13] Permission denied: '...foo'
>>> os.chmod (foo, 0400)
the directory is still there!
>>> os.path.isdir (d)
1
rmtree should be able to remove it:
the new function should be able to solve this for us
>>> rmtree (d)
and now the directory is gone
>>> os.path.isdir (d)
0
"""
...
...
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