mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Added more error checking code to migratecfg
This commit is contained in:
parent
975e1c7567
commit
cf0b2aae7c
1 changed files with 5 additions and 3 deletions
|
@ -5,6 +5,8 @@ from nzbtomedia.nzbToMediaConfig import config
|
||||||
class migratecfg:
|
class migratecfg:
|
||||||
def migrate(self):
|
def migrate(self):
|
||||||
categories = []
|
categories = []
|
||||||
|
confignew = None
|
||||||
|
configold = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# check for autoProcessMedia.cfg and create if it does not exist
|
# check for autoProcessMedia.cfg and create if it does not exist
|
||||||
|
@ -21,7 +23,7 @@ class migratecfg:
|
||||||
except:pass
|
except:pass
|
||||||
|
|
||||||
# check for autoProcessMedia.cfg and autoProcessMedia.cfg.sample and if they don't exist return and fail
|
# check for autoProcessMedia.cfg and autoProcessMedia.cfg.sample and if they don't exist return and fail
|
||||||
if not config() and not config(config.SAMPLE_CONFIG_FILE):
|
if not config() and not config(config.SAMPLE_CONFIG_FILE) or not confignew or not configold:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
section = "CouchPotato"
|
section = "CouchPotato"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue