aboutsummaryrefslogtreecommitdiff
path: root/games/unknown-horizons/files
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2013-03-07 07:47:55 +0000
committerBeech Rintoul <beech@FreeBSD.org>2013-03-07 07:47:55 +0000
commit47a77e767a8585c0f216a8491edc34230d058aac (patch)
treef9226463bcccf2b28fdc908f8d8f721c06a7af71 /games/unknown-horizons/files
parent50d32184ce80e0bbde5e03ebbe12154c9f9ef906 (diff)
downloadports-47a77e767a8585c0f216a8491edc34230d058aac.tar.gz
ports-47a77e767a8585c0f216a8491edc34230d058aac.zip
Notes
Diffstat (limited to 'games/unknown-horizons/files')
-rw-r--r--games/unknown-horizons/files/patch-horizons-savegamemanager.py11
-rw-r--r--games/unknown-horizons/files/patch-horizons-util-yamlcache.py47
2 files changed, 0 insertions, 58 deletions
diff --git a/games/unknown-horizons/files/patch-horizons-savegamemanager.py b/games/unknown-horizons/files/patch-horizons-savegamemanager.py
index a10d10a12f36..e69de29bb2d1 100644
--- a/games/unknown-horizons/files/patch-horizons-savegamemanager.py
+++ b/games/unknown-horizons/files/patch-horizons-savegamemanager.py
@@ -1,11 +0,0 @@
---- horizons/savegamemanager.py.orig 2012-05-26 22:01:19.000000000 +0400
-+++ horizons/savegamemanager.py 2012-05-26 22:02:27.000000000 +0400
-@@ -370,7 +370,7 @@
- def get_campaign_status(cls):
- """Read the campaign status from the saved YAML file"""
- if os.path.exists(cls.campaign_status_file):
-- return YamlCache.get_yaml_file(cls.campaign_status_file)
-+ return YamlCache.get_file(cls.campaign_status_file)
- return {}
-
- @classmethod
diff --git a/games/unknown-horizons/files/patch-horizons-util-yamlcache.py b/games/unknown-horizons/files/patch-horizons-util-yamlcache.py
index ef522c00ce8f..e69de29bb2d1 100644
--- a/games/unknown-horizons/files/patch-horizons-util-yamlcache.py
+++ b/games/unknown-horizons/files/patch-horizons-util-yamlcache.py
@@ -1,47 +0,0 @@
---- horizons/util/yamlcache.py.orig 2012-05-26 21:52:18.000000000 +0400
-+++ horizons/util/yamlcache.py 2012-05-26 21:57:18.000000000 +0400
-@@ -82,11 +82,6 @@
-
- @classmethod
- def get_file(cls, filename, game_data=False):
-- data = cls.get_yaml_file(filename, game_data=game_data)
-- return data
--
-- @classmethod
-- def get_yaml_file(cls, filename, game_data=False):
- # calc the hash
- f = open(filename, 'r')
- h = hash(f.read())
-@@ -98,7 +93,7 @@
- if isinstance(filename, unicode):
- filename = filename.encode('utf8') # shelve needs str keys
-
-- def handle_get_yaml_file_error(e, release):
-+ def handle_get_file_error(e, release):
- # when something unexpected happens, shelve does not guarantee anything.
- # since crashing on any access is part of the specified behaviour, we need to handle it.
- # cf. http://bugs.python.org/issue14041
-@@ -108,12 +103,12 @@
- cls.cache = None
- if release:
- cls.lock.release()
-- return cls.get_yaml_file(filename, game_data=game_data)
-+ return cls.get_file(filename, game_data=game_data)
-
- try:
- yaml_file_in_cache = (filename in cls.cache and cls.cache[filename][0] == h)
- except Exception as e:
-- return handle_get_yaml_file_error(e, release=False)
-+ return handle_get_file_error(e, release=False)
-
- if not yaml_file_in_cache:
- data = yaml.load( f, Loader = SafeLoader )
-@@ -131,7 +126,7 @@
- try:
- cls.cache[filename] = (h, data)
- except Exception as e:
-- return handle_get_yaml_file_error(e, release=True)
-+ return handle_get_file_error(e, release=True)
-
- if not cls.sync_scheduled:
- cls.sync_scheduled = True