Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_export_mailbox.py
Show All 11 Lines | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
# GNU General Public License for more details. | # GNU General Public License for more details. | ||||
# You should have received a copy of the GNU General Public License | # You should have received a copy of the GNU General Public License | ||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
# | # | ||||
from __future__ import print_function | |||||
import commands | import commands | ||||
import pykolab | import pykolab | ||||
from pykolab.translate import _ | from pykolab.translate import _ | ||||
log = pykolab.getLogger('pykolab.cli') | log = pykolab.getLogger('pykolab.cli') | ||||
conf = pykolab.getConf() | conf = pykolab.getConf() | ||||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | for mbox_internal in mboxlist_output.split('\n'): | ||||
) | ) | ||||
if not len(directories) == 0: | if not len(directories) == 0: | ||||
zipper_output = subprocess.Popen( | zipper_output = subprocess.Popen( | ||||
zipper_args + directories, | zipper_args + directories, | ||||
stdout=subprocess.PIPE | stdout=subprocess.PIPE | ||||
).communicate()[0] | ).communicate()[0] | ||||
print >> sys.stderr, _("ZIP file at %s.zip") % (user) | print(_("ZIP file at %s.zip") % (user), file=sys.stderr) | ||||
else: | else: | ||||
print >> sys.stderr, _("No directories found for user %s") % (user) | print(_("No directories found for user %s") % (user), file=sys.stderr) | ||||
sys.exit(1) | sys.exit(1) | ||||