diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-01-18 19:09:58 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-01-18 19:09:58 +0100 |
commit | cc7362d28bd9c43cb6839809f86e59874f2fe458 (patch) | |
tree | 1053748f5890c769d1e99806bc0c8bcffca6f0fe /libbe/ui/util | |
parent | 003bd13629d9db2f14156f97b74a4672e9ecdf77 (diff) | |
download | bugseverywhere-cc7362d28bd9c43cb6839809f86e59874f2fe458.tar.gz |
2to3 conversion of the repo.
Diffstat (limited to 'libbe/ui/util')
-rw-r--r-- | libbe/ui/util/editor.py | 4 | ||||
-rw-r--r-- | libbe/ui/util/user.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libbe/ui/util/editor.py b/libbe/ui/util/editor.py index f852c01..8412ff6 100644 --- a/libbe/ui/util/editor.py +++ b/libbe/ui/util/editor.py @@ -36,7 +36,7 @@ if libbe.TESTING == True: import doctest -comment_marker = u"== Anything below this line will be ignored\n" +comment_marker = "== Anything below this line will be ignored\n" class CantFindEditor(Exception): def __init__(self): @@ -76,7 +76,7 @@ def editor_string(comment=None, encoding=None): fhandle, fname = tempfile.mkstemp() try: if comment is not None: - cstring = u'\n'+comment_string(comment) + cstring = '\n'+comment_string(comment) os.write(fhandle, cstring.encode(encoding)) os.close(fhandle) oldmtime = os.path.getmtime(fname) diff --git a/libbe/ui/util/user.py b/libbe/ui/util/user.py index 5306593..4a4e7f1 100644 --- a/libbe/ui/util/user.py +++ b/libbe/ui/util/user.py @@ -46,7 +46,7 @@ def get_fallback_username(): """ name = None for env in ['LOGNAME', 'USERNAME']: - if os.environ.has_key(env): + if env in os.environ: name = os.environ[env] break if name is None and pwd: @@ -60,7 +60,7 @@ def get_fallback_fullname(): """ name = None for env in ['FULLNAME']: - if os.environ.has_key(env): + if env in os.environ: name = os.environ[env] break if pwd and not name: |