2
# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 2; coding: utf-8 -*-
4
# This file is part of Déjà Dup.
5
# For copyright information, see AUTHORS.
7
# Déjà Dup is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
12
# Déjà Dup is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
# General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with Déjà Dup. If not, see <http://www.gnu.org/licenses/>.
20
import subprocess, sys
22
p = subprocess.Popen (['duplicity.real'] + sys.argv[1:], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
23
out, err = p.communicate ()
24
fd = open("deja-dup-duplicity.out", "w")
25
fd.write (out.decode ())
27
fd = open("deja-dup-duplicity.err", "w")
28
fd.write (err.decode ())
31
print (out.decode (), end="")
33
print (err.decode (), end="", file=sys.stderr)