projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e62eb36
)
Ommit using os.path.relpath
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Sat, 26 Jan 2013 13:57:53 +0000
(15:57 +0200)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Sat, 26 Jan 2013 13:57:53 +0000
(15:57 +0200)
The method has different behaviour in python 2.6 and python 2.7.
In python 2.6, os.path.relpath('/proc', '/) will output '../proc'
where in python 2.7 it will output 'proc'.
image_creator/bundle_volume.py
patch
|
blob
|
history
diff --git
a/image_creator/bundle_volume.py
b/image_creator/bundle_volume.py
index
3eb810a
..
56d4a78
100644
(file)
--- a/
image_creator/bundle_volume.py
+++ b/
image_creator/bundle_volume.py
@@
-385,8
+385,7
@@
class BundleVolume(object):
rsync = Rsync(self.out)
# Excluded paths need to be relative to the source
- for excl in map(lambda p: os.path.relpath(p, '/'),
- excluded + [image]):
+ for excl in map(lambda p: p[1:], excluded + [image]):
rsync.exclude(excl)
rsync.archive().hard_links().xattrs().sparse().acls()