Skip to content

Commit

Permalink
Try to check for windows before using os.startfile() to satisfy pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
g1itch committed May 5, 2020
1 parent 5c2d64e commit 2532aae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bitmessageqt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def powQueueSize():
def openKeysFile():
"""Open keys file with an external editor"""
keysfile = os.path.join(state.appdata, 'keys.dat')
if 'linux' in sys.platform:
subprocess.call(["xdg-open", keysfile])
else:
if sys.platform.startswith('win'):
os.startfile(keysfile)
elif os.name == 'posix':
subprocess.call(["xdg-open", keysfile])


class MyForm(settingsmixin.SMainWindow):
Expand Down

0 comments on commit 2532aae

Please sign in to comment.