summaryrefslogtreecommitdiff
path: root/portato/gui/session.py
blob: e356fbd859dc44792b14ae456083687e98917abb (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.")
git/commit/static/images/tmp/.keep?id=9cf3ee4782b567949f58764d3a7249b48e7a78a0&follow=1'>Created tmp directoryRené 'Necoro' Neumann2-0/+1 2010-04-07DownloadRené 'Necoro' Neumann1-1/+1 2010-04-07Development pageRené 'Necoro' Neumann2-2/+51 2010-04-07Menu reorderingRené 'Necoro' Neumann1-2/+2 2010-04-07Screenshot pageRené 'Necoro' Neumann2-0/+7 2010-04-07ForumsRené 'Necoro' Neumann1-0/+6 2010-04-07Some more tocRené 'Necoro' Neumann2-3/+9 2010-04-07Use 'Found' instead of 'Redirect'René 'Necoro' Neumann1-1/+1 2010-04-07Sanitized JSRené 'Necoro' Neumann2-15/+14 2010-04-07Fixed CSS; added stuff for TOCRené 'Necoro' Neumann1-8/+19 2010-04-07Renamed 'menu' to the correct 'toc'René 'Necoro' Neumann2-8/+8 2010-04-07Default argument for 404René 'Necoro' Neumann1-1/+1 2010-04-07Javascript to generate TOCsRené 'Necoro' Neumann4-1/+63