Commit d24ba1e7 by Őry Máté

notify: don't open console browser (w3m)

parent f6668b6d
...@@ -101,7 +101,8 @@ def notify(url): ...@@ -101,7 +101,8 @@ def notify(url):
else: else:
display = True display = True
webbrowser.open(url, new=2, autoraise=True) if display:
webbrowser.open(url, new=2, autoraise=True)
finally: finally:
os.environ["DISPLAY"] = olddisplay os.environ["DISPLAY"] = olddisplay
...@@ -116,7 +117,7 @@ def file_already_exists(name, mode=0644): ...@@ -116,7 +117,7 @@ def file_already_exists(name, mode=0644):
try: try:
fd = os.open(name, os.O_CREAT | os.O_EXCL, mode) fd = os.open(name, os.O_CREAT | os.O_EXCL, mode)
except OSError as e: except OSError as e:
if e.errno == os.EEXIST: if e.errno == errno.EEXIST:
return True return True
else: else:
os.close(fd) os.close(fd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment