Commit adc267a8 authored by Matthias Putz's avatar Matthias Putz

fixed wrong dependency of repo

parent 4138ced9
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
import sys import sys
# copied from portable # copied from portable
import portable def removeReadOnlyFiles(fn, path):
if not os.access(path, os.W_OK):
os.chmod(path, stat.S_IWUSR)
fn(path)
else:
raise Exception("Could not delete %s" % path)
def stream2str(stream): def stream2str(stream):
return str(stream, encoding='UTF-8') return str(stream, encoding='UTF-8')
...@@ -664,7 +669,7 @@ def main(orig_args): ...@@ -664,7 +669,7 @@ def main(orig_args):
except CloneFailure: except CloneFailure:
for root, dirs, files in os.walk(repodir, topdown=False): for root, dirs, files in os.walk(repodir, topdown=False):
for name in files: for name in files:
portable.removeReadOnlyFiles(os.remove, os.path.join(root, name)) removeReadOnlyFiles(os.remove, os.path.join(root, name))
for name in dirs: for name in dirs:
os.rmdir(os.path.join(root, name)) os.rmdir(os.path.join(root, name))
os.rmdir(repodir) os.rmdir(repodir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment