summaryrefslogtreecommitdiff
path: root/portato/gui/session.py
blob: 7aa890d6996f754dc6011852f1e4648e43e2374d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- coding: utf-8 -*-
#
# File: portato/gui/session.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software.  You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>

from ..helper import debug

# the current version for saved sessions
# change this, whenever the change is incompatible with previous versions
SESSION_VERSION = 4

class SessionException (Exception):

    error = _("Version mismatch.")
    def __init__ (self, got, expected):
        self.got = got
        self.expected = expected

    def __str__ (self):
        return "%s %s" % (self.error, (_("Got '%d' - expected '%d'.") % (self.got, self.expected)))

class OldSessionException (SessionException):
    error = _("Current session format is too old.")

class NewSessionException (SessionException):
    error = _("Current session format is newer than this version supports.")
c5a3d8ee60fc15d2be609775827d436&follow=1'>Clean up git handling.Jason A. Donenfeld2-42/+28 Get rid of push/pull shortcuts, as they weren't widely used. Add contents to repo on git init. Centralize git add logic, and make it less error prone. 2012-09-19Fix git regression.Jason A. Donenfeld1-1/+1 2012-09-18Add additional information from KeepassX xmlJuhamatti Niemelä1-3/+15 Import passwords as multiline entries with password in the first line. Rest contains following data if they exist in the entry element of the xml file: - username - url - comment 2012-09-18Copyright and licensing info to keepassx2pass scriptJuhamatti Niemelä1-0/+4 2012-09-18Quote the template.Jason A. Donenfeld1-1/+1 2012-09-18Better dependency list.Jason A. Donenfeld1-1/+10 2012-09-18Make recursive make silent.Jason A. Donenfeld1-1/+1 2012-09-18Quote the program name.Jason A. Donenfeld1-4/+4 2012-09-17Abstract potentially platform specific commands into their own commands.Jason A. Donenfeld4-72/+97 2012-09-16Support recursive and forced removal.Jason A. Donenfeld2-12/+28 Laurent asked for this. Reported-by: Laurent Ghigonis <laurent@p1sec.com> 2012-09-16Small stylistic things.Jason A. Donenfeld1-9/+9 Reported-by: Laurent Ghigonis <laurent@p1sec.com> 2012-09-15Use --force flag in keepassx import.Jason A. Donenfeld1-1/+1