[pitivi] Don't search a 'None' var



commit 2e2b12bcb1fb5de5a5ada1b4cd13d5797e9807b2
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Nov 15 01:26:02 2009 +0100

    Don't search a 'None' var

 pitivi/settings.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/settings.py b/pitivi/settings.py
index 406b43b..67d3a7b 100644
--- a/pitivi/settings.py
+++ b/pitivi/settings.py
@@ -60,6 +60,8 @@ def get_env_by_type(type_, var):
     @returns: The content of the environment variable, or C{None} if it doesn't
     exist.
     """
+    if var is None:
+        return None
     if type_ == bool:
         return get_bool_env(var)
     else:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]