diff options
Diffstat (limited to 'libbe/ui/util')
-rw-r--r-- | libbe/ui/util/editor.py | 4 | ||||
-rw-r--r-- | libbe/ui/util/user.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libbe/ui/util/editor.py b/libbe/ui/util/editor.py index 8412ff6..5ab519f 100644 --- a/libbe/ui/util/editor.py +++ b/libbe/ui/util/editor.py @@ -64,14 +64,14 @@ def editor_string(comment=None, encoding=None): >>> del os.environ["EDITOR"] >>> del os.environ["VISUAL"] """ - if encoding == None: + if encoding is None: encoding = libbe.util.encoding.get_text_file_encoding() editor = None for name in ('VISUAL', 'EDITOR'): if name in os.environ and os.environ[name] != '': editor = os.environ[name] break - if editor == None: + if editor is None: raise CantFindEditor() fhandle, fname = tempfile.mkstemp() try: diff --git a/libbe/ui/util/user.py b/libbe/ui/util/user.py index 4a4e7f1..1d7e874 100644 --- a/libbe/ui/util/user.py +++ b/libbe/ui/util/user.py @@ -92,7 +92,7 @@ def create_user_id(name, email=None): parse_user_id : inverse """ assert len(name) > 0 - if email == None or len(email) == 0: + if email is None or len(email) == 0: return name else: return formataddr((name, email)) @@ -137,11 +137,11 @@ def get_user_id(storage=None): configured it directly. """ user = libbe.storage.util.config.get_val('user') - if user != None: + if user is not None: return user - if storage != None and hasattr(storage, 'get_user_id'): + if storage is not None and hasattr(storage, 'get_user_id'): user = storage.get_user_id() - if user != None: + if user is not None: return user name = get_fallback_fullname() email = get_fallback_email() |