summaryrefslogtreecommitdiff
path: root/seivot
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-07-20 07:22:08 +0100
committerLars Wirzenius <liw@liw.fi>2011-07-20 07:22:08 +0100
commitebdc30e2c3a31ec79be35724f2a4fa39704464a0 (patch)
treee3864c9516276bf1dee188cc22671b5f70a8b12b /seivot
parent198e6580fbe834a06b84b3a0236f853614d3cf1b (diff)
downloadseivot-ebdc30e2c3a31ec79be35724f2a4fa39704464a0.tar.gz
When setting PYTHONPATH, keep old stuff in it instead of overriding it.
Diffstat (limited to 'seivot')
-rwxr-xr-xseivot7
1 files changed, 6 insertions, 1 deletions
diff --git a/seivot b/seivot
index dd80a79..7946ee2 100755
--- a/seivot
+++ b/seivot
@@ -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)