summaryrefslogtreecommitdiff
path: root/portato/gui/session.py
blob: a37cd85730b2c672ec9f176eac90a93c7722f963 (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) 2008 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 = 1

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.")
id=4896a255f7064cd669edb9b42dce32a57541ea62&follow=1'>changed changelognecoro1-1/+2 2007-03-31Some small changes for etcproposals 1.1necoro1-2/+2 2007-03-31Some small changes for etcproposals 1.1necoro2-3/+3 2007-03-31Some small changes for etcproposals 1.1necoro1-6/+13 2007-03-31Allowed Plugins to have a menunecoro7-201/+315 2007-03-15Added etc-proposals pluginnecoro7-28/+121 2007-03-10Added USE_EXPAND-supportnecoro5-11/+63 2007-03-10Added plugin-data to about-dialognecoro3-197/+264