Merge pull request #792 from nwwt/skip-addons-argument
Add command-line argument to skip addons
This commit is contained in:
commit
73f2042bde
@ -51,7 +51,7 @@ Andrew Gaul <andrew@gaul.org>
|
||||
kenden
|
||||
Nickolay Yudin <kelciour@gmail.com>
|
||||
neitrinoweb <github.com/neitrinoweb/>
|
||||
Andreas Reis <github.com/rathsky>
|
||||
Andreas Reis <github.com/nwwt>
|
||||
Matt Krump <github.com/mkrump>
|
||||
Alexander Presnyakov <flagist0@gmail.com>
|
||||
abdo <github.com/abdnh>
|
||||
|
@ -319,6 +319,9 @@ def parseArgs(argv):
|
||||
parser.add_argument("-p", "--profile", help="profile name to load", default="")
|
||||
parser.add_argument("-l", "--lang", help="interface language (en, de, etc)")
|
||||
parser.add_argument("-v", "--version", help="print the Anki version and exit")
|
||||
parser.add_argument(
|
||||
"-s", "--safemode", help="disable addons and automatic syncing"
|
||||
)
|
||||
return parser.parse_known_args(argv[1:])
|
||||
|
||||
|
||||
|
@ -112,7 +112,9 @@ class AnkiQt(QMainWindow):
|
||||
self.app = app
|
||||
self.pm = profileManager
|
||||
# init rest of app
|
||||
self.safeMode = self.app.queryKeyboardModifiers() & Qt.ShiftModifier
|
||||
self.safeMode = (
|
||||
self.app.queryKeyboardModifiers() & Qt.ShiftModifier
|
||||
) or self.opts.safemode
|
||||
try:
|
||||
self.setupUI()
|
||||
self.setupAddons(args)
|
||||
|
Loading…
Reference in New Issue
Block a user