Explorar o código

Use 'key in dict' instead of 'dict.get(key)'

Guillaume Ayoub %!s(int64=14) %!d(string=hai) anos
pai
achega
fe71b34697
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      radicale/config.py

+ 1 - 1
radicale/config.py

@@ -74,7 +74,7 @@ for section, values in INITIAL_CONFIG.items():
 
 _CONFIG_PARSER.read("/etc/radicale/config")
 _CONFIG_PARSER.read(os.path.expanduser("~/.config/radicale/config"))
-if os.environ.get('RADICALE_CONFIG', None):
+if 'RADICALE_CONFIG' in os.environ:
     _CONFIG_PARSER.read(os.environ['RADICALE_CONFIG'])
 
 # Wrap config module into ConfigParser instance