Browse Source

Precises exception catch

Adrien Panay 7 years ago
parent
commit
5c7e89c039
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tracim/tracim/lib/helpers.py

+ 3 - 3
tracim/tracim/lib/helpers.py View File

38
     """
38
     """
39
     # TODO - A.P - language code access from test environment
39
     # TODO - A.P - language code access from test environment
40
     # try based workaround instead of raw get language call for test
40
     # try based workaround instead of raw get language call for test
41
-    # environment only, this should be set with tg.i18n.set_lang in
42
-    # be I was unable to achieve that.
41
+    # environment only, this should be set with tg.i18n.set_lang but
42
+    # I was unable to achieve that.
43
     try:
43
     try:
44
         result = tg.i18n.get_lang(all=False)[0]
44
         result = tg.i18n.get_lang(all=False)[0]
45
-    except:
45
+    except IndexError:
46
         result = 'en'
46
         result = 'en'
47
     return result
47
     return result
48
 
48