forked from metabrainz/picard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tagger.py.in
26 lines (20 loc) · 659 Bytes
/
tagger.py.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
import os
import sys
sys.path.insert(0, '.')
# This is needed to find resources when using pyinstaller
if getattr(sys, 'frozen', False):
basedir = getattr(sys, '_MEIPASS', '')
else:
basedir = os.path.dirname(os.path.abspath(__file__))
if sys.platform == 'win32':
os.environ['PATH'] = basedir + ';' + os.environ['PATH']
try:
from picard.tagger import main
main(os.path.join(basedir, 'locale'), %(autoupdate)s)
except SystemExit:
raise # Just continue with a normal application exit
except: # noqa: E722,F722 # pylint: disable=bare-except
from picard import crash_handler
crash_handler()
raise