better error message
This commit is contained in:
parent
e7d24c31bd
commit
7ef86d8bbb
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
from i18n import _
|
||||
|
||||
try:
|
||||
import zbar
|
||||
|
@ -8,7 +9,7 @@ except ImportError:
|
|||
|
||||
def scan_qr(config):
|
||||
if not zbar:
|
||||
raise BaseException("The zbar package is not available.\nOn Linux, try 'sudo apt-get install python-zbar'")
|
||||
raise BaseException("\n".join([_("Cannot start QR scanner."),_("The zbar package is not available."),_("On Linux, try 'sudo apt-get install python-zbar'")]))
|
||||
device = config.get("video_device", "default")
|
||||
if device == 'default':
|
||||
device = ''
|
||||
|
|
Loading…
Reference in New Issue