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:
parent
546e9c2776
commit
601c3d646a
|
@ -255,6 +255,7 @@ class ObjectView(object):
|
||||||
# Config Files Helper:
|
# Config Files Helper:
|
||||||
|
|
||||||
def config_file_setup():
|
def config_file_setup():
|
||||||
|
global configs
|
||||||
configs = configparser.RawConfigParser()
|
configs = configparser.RawConfigParser()
|
||||||
configs.optionxform = str
|
configs.optionxform = str
|
||||||
try:
|
try:
|
||||||
|
@ -267,6 +268,7 @@ def config_file_setup():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def config_del(name):
|
def config_del(name):
|
||||||
|
global configs
|
||||||
secname = 'service_' + name
|
secname = 'service_' + name
|
||||||
if configs == None:
|
if configs == None:
|
||||||
try:
|
try:
|
||||||
|
@ -278,6 +280,7 @@ def config_del(name):
|
||||||
config_write(name)
|
config_write(name)
|
||||||
|
|
||||||
def config_set(name, key, value):
|
def config_set(name, key, value):
|
||||||
|
global configs
|
||||||
secname = 'service_' + name
|
secname = 'service_' + name
|
||||||
if configs == None:
|
if configs == None:
|
||||||
try:
|
try:
|
||||||
|
@ -295,6 +298,7 @@ def config_set(name, key, value):
|
||||||
config_write(name)
|
config_write(name)
|
||||||
|
|
||||||
def config_get(name):
|
def config_get(name):
|
||||||
|
global configs
|
||||||
if configs == None:
|
if configs == None:
|
||||||
try:
|
try:
|
||||||
config_file_setup()
|
config_file_setup()
|
||||||
|
@ -313,6 +317,7 @@ def config_exists(name):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def config_write(name):
|
def config_write(name):
|
||||||
|
global configs
|
||||||
try:
|
try:
|
||||||
with open(CONF_FILE, 'w', encoding='utf8') as configfile:
|
with open(CONF_FILE, 'w', encoding='utf8') as configfile:
|
||||||
configs.write(configfile)
|
configs.write(configfile)
|
||||||
|
|
Loading…
Reference in New Issue