diff options
author | Sascha 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) |
commit | d6057b26ab7c6f8412457ca7be97d4e146ed9cad (patch) | |
tree | 68556c088b99aa9fdbd620544974dfadb8a350cb /setup.py | |
parent | 91adf602db6d500194cb61cd416d4f4c788adcb5 (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-x | setup.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |