Skip to content

Commit 11db8b5

Browse files
Fix postinstall and ui/notebook errors
1 parent 371a594 commit 11db8b5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/robotide/postinstall/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
# DEBUG: Add -remove, to remove desktop shortcut
4747

4848
ROBOT_ICO = "robot.ico"
49-
DEFAULT_LANGUAGE = environ.get('LANG', '').split(':')
5049

5150

5251
def verify_install():
@@ -182,6 +181,9 @@ def _create_desktop_shortcut_linux(frame=None):
182181
"fi": r"Työpöytä", "fr": "Bureau", "it": "Scrivania",
183182
"pt": r"Área de Trabalho", "zh": "Desktop"}
184183
user = basename(expanduser('~'))
184+
DEFAULT_LANGUAGE = environ.get('LANG', '').split(':')
185+
if DEFAULT_LANGUAGE is None:
186+
DEFAULT_LANGUAGE = ['en_US']
185187
try:
186188
ndesktop = desktop[DEFAULT_LANGUAGE[0][:2]]
187189
directory = join(expanduser('~'), ndesktop)

src/robotide/ui/notebook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import wx.lib.agw.aui as aui
2020

2121
from ..publish import RideNotebookTabChanging, RideNotebookTabChanged
22+
from wx import wxAssertionError
2223

2324

2425
class NoteBook(aui.AuiNotebook):
@@ -85,7 +86,7 @@ def on_tab_changing(self, event):
8586
oldselect = event.GetOldSelection()
8687
try:
8788
oldtitle = self.GetPageText(oldselect)
88-
except (wx.wxAssertionError, RuntimeError):
89+
except (wxAssertionError, RuntimeError):
8990
oldtitle = ""
9091
newindex = event.GetSelection()
9192
newtitle = self.GetPageText(event.GetSelection())

0 commit comments

Comments
 (0)