mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Fixed bug in migratecfg
This commit is contained in:
parent
5f476ebc1a
commit
e272d5d23e
1 changed files with 7 additions and 4 deletions
|
@ -107,11 +107,14 @@ def migrate():
|
||||||
confignew.set(section, option, value)
|
confignew.set(section, option, value)
|
||||||
|
|
||||||
for section in categories:
|
for section in categories:
|
||||||
if configold.items(section):
|
try:
|
||||||
confignew.add_section(section)
|
if configold.items(section):
|
||||||
|
confignew.add_section(section)
|
||||||
|
|
||||||
for option, value in configold.items(section):
|
for option, value in configold.items(section):
|
||||||
confignew.set(section, option, value)
|
confignew.set(section, option, value)
|
||||||
|
except config.NoSectionError:
|
||||||
|
continue
|
||||||
|
|
||||||
# create a backup of our old config
|
# create a backup of our old config
|
||||||
if os.path.isfile(CONFIG_FILE):
|
if os.path.isfile(CONFIG_FILE):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue