From f318abc8727c04fb6d464abfc5c564a46b2c23b2 Mon Sep 17 00:00:00 2001 From: echel0n Date: Fri, 4 Apr 2014 16:11:52 -0700 Subject: [PATCH] Fixed some conditional checks for NZBGet enviroment strings --- nzbtomedia/migratecfg.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nzbtomedia/migratecfg.py b/nzbtomedia/migratecfg.py index af1072a7..d1382a65 100644 --- a/nzbtomedia/migratecfg.py +++ b/nzbtomedia/migratecfg.py @@ -138,7 +138,7 @@ class migratecfg: if os.environ.has_key(key): option = cfgKeys[index] value = os.environ[key] - if confignew[section].has_key(os.environ[envCatKey]) and option not in confignew[section].sections: + if os.environ[envCatKey] in confignew[section].sections: confignew[section][envCatKey][option] = value @@ -151,7 +151,7 @@ class migratecfg: if os.environ.has_key(key): option = cfgKeys[index] value = os.environ[key] - if confignew[section].has_key(os.environ[envCatKey]) and option not in confignew[section].sections: + if os.environ[envCatKey] in confignew[section].sections: confignew[section][envCatKey][option] = value section = "HeadPhones" @@ -163,7 +163,7 @@ class migratecfg: if os.environ.has_key(key): option = cfgKeys[index] value = os.environ[key] - if confignew[section].has_key(os.environ[envCatKey]) and option not in confignew[section].sections: + if os.environ[envCatKey] in confignew[section].sections: confignew[section][envCatKey][option] = value section = "Mylar" @@ -175,7 +175,7 @@ class migratecfg: if os.environ.has_key(key): option = cfgKeys[index] value = os.environ[key] - if confignew[section].has_key(os.environ[envCatKey]) and option not in confignew[section].sections: + if os.environ[envCatKey] in confignew[section].sections: confignew[section][envCatKey][option] = value section = "Gamez" @@ -187,7 +187,7 @@ class migratecfg: if os.environ.has_key(key): option = cfgKeys[index] value = os.environ[key] - if confignew[section].has_key(os.environ[envCatKey]) and option not in confignew[section].sections: + if os.environ[envCatKey] in confignew[section].sections: confignew[section][envCatKey][option] = value section = "Extensions"