Added global declarations to the config-helper methods for the configs variable. This should fix the current error reported in T800.

Test Plan: With the global declarations the error after clicking the network name in the list is gone.

Reviewers: kuuko, leif

Reviewed By: leif

Differential Revision: https://phab.enlightenment.org/D472
This commit is contained in:
Daniel Haß 2014-01-20 14:18:11 +01:00 committed by Leif Middelschulte
parent 546e9c2776
commit 601c3d646a
1 changed files with 5 additions and 0 deletions

View File

@ -255,6 +255,7 @@ class ObjectView(object):
# Config Files Helper:
def config_file_setup():
global configs
configs = configparser.RawConfigParser()
configs.optionxform = str
try:
@ -267,6 +268,7 @@ def config_file_setup():
pass
def config_del(name):
global configs
secname = 'service_' + name
if configs == None:
try:
@ -278,6 +280,7 @@ def config_del(name):
config_write(name)
def config_set(name, key, value):
global configs
secname = 'service_' + name
if configs == None:
try:
@ -295,6 +298,7 @@ def config_set(name, key, value):
config_write(name)
def config_get(name):
global configs
if configs == None:
try:
config_file_setup()
@ -313,6 +317,7 @@ def config_exists(name):
return False
def config_write(name):
global configs
try:
with open(CONF_FILE, 'w', encoding='utf8') as configfile:
configs.write(configfile)