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.")
der'>2011-03-13Add list_cc_flagsRené 'Necoro' Neumann1-0/+23 2011-03-13Enhanced the open_ebuild functionRené 'Necoro' Neumann1-6/+29 2011-03-13make menc() more verboseRené 'Necoro' Neumann1-0/+5 2011-03-13Better 'cci' outputRené 'Necoro' Neumann1-0/+2 2011-03-13Add function to mount encrypted thingiesRené 'Necoro' Neumann1-0/+11 2011-03-13Make 'Y' behave correctly in vimRené 'Necoro' Neumann1-0/+3 2011-02-10backward-kill-wordRené 'Necoro' Neumann1-0/+3 2011-02-10Fix zsh versionRené 'Necoro' Neumann1-1/+1