diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-07-20 07:22:08 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-07-20 07:22:08 +0100 |
commit | ebdc30e2c3a31ec79be35724f2a4fa39704464a0 (patch) | |
tree | e3864c9516276bf1dee188cc22671b5f70a8b12b /seivot | |
parent | 198e6580fbe834a06b84b3a0236f853614d3cf1b (diff) | |
download | seivot-ebdc30e2c3a31ec79be35724f2a4fa39704464a0.tar.gz |
When setting PYTHONPATH, keep old stuff in it instead of overriding it.
Diffstat (limited to 'seivot')
-rwxr-xr-x | seivot | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -165,7 +165,12 @@ class Obnam(BackupProgram): } env['OBNAM_PROFILE'] = self.settings['obnam-profile'] % namepattern if self._larch_branch: - env['PYTHONPATH'] = self._larch_branch + old = env['PYTHONPATH'] + if old: + new = '%s:%s' % (self._larch_branch, old) + else: + new = self._larch_branch + env['PYTHONPATH'] = new if self.settings['encrypt-with']: cmd += ['--encrypt-with', self.settings['encrypt-with']] result = runcmd(cmd + args, cwd=self._branch, env=env, **kwargs) |