Configuration can be forced into local mode

This commit is contained in:
Frank DeMarco 2012-07-05 19:37:55 +09:00
parent 8fbfb84115
commit 753ef91521
2 changed files with 4 additions and 4 deletions

3
README
View File

@ -2,8 +2,7 @@
Pygame Framework
----------------
Set of classes that facilitate the creation of Pygame projects and/or their
features.
Classes that facilitate the creation of Pygame projects
Example

View File

@ -10,8 +10,9 @@ class Configuration(RawConfigParser):
default_rel_path = "config"
def __init__(self, installed_resources_path=None, rel_path=None,
type_declarations=None):
type_declarations=None, local=False):
RawConfigParser.__init__(self)
self.local = local
self.set_type_declarations(type_declarations)
self.set_defaults()
self.installed_resources_path = installed_resources_path
@ -84,7 +85,7 @@ class Configuration(RawConfigParser):
return rel_path
def is_local_mode(self):
return "-l" in argv
return "-l" in argv or self.local
def get(self, section, option):
value = RawConfigParser.get(self, section, option)