Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2012-04-22 14:48:11 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2012-04-22 14:48:11 (GMT)
commitd6057b26ab7c6f8412457ca7be97d4e146ed9cad (patch)
tree68556c088b99aa9fdbd620544974dfadb8a350cb /setup.py
parent91adf602db6d500194cb61cd416d4f4c788adcb5 (diff)
setup.py: fix support for installing without root prefix
8bce5a1 broke installation without --root= because self.root is None in that case. Make sure we're using a string for len() even if self.root is None.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 153f084..c3f6a12 100755
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,7 @@ class install_dbus(Command): # pylint: disable=C0103,R0904
def process_template(self, template_path, service_path):
"""Copy template_path to service_path, replacing format specifiers.
"""
- variables = {'install_dir': self.install_dir[len(self.root):]}
+ variables = {'install_dir': self.install_dir[len(self.root or ''):]}
with file(service_path, 'w') as service_file:
for line in file(template_path):
service_file.write(line % variables)