aboutsummaryrefslogtreecommitdiffstats
path: root/lib/orm/management/commands/checksettings.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/orm/management/commands/checksettings.py')
-rw-r--r--lib/orm/management/commands/checksettings.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/orm/management/commands/checksettings.py b/lib/orm/management/commands/checksettings.py
index c4b646d0..f5e4df02 100644
--- a/lib/orm/management/commands/checksettings.py
+++ b/lib/orm/management/commands/checksettings.py
@@ -1,9 +1,6 @@
-from django.core.management.base import BaseCommand, CommandError
-from django.db import transaction
-
+from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.contrib.auth.models import Permission, Group
-from django.core.exceptions import ObjectDoesNotExist
from django.contrib.contenttypes.models import ContentType
from orm.models import SrtSetting, DataSource
@@ -13,7 +10,6 @@ import os
import traceback
import warnings
import glob
-import sqlite3
import json
# quick development/debugging support
@@ -56,7 +52,7 @@ class Command(BaseCommand):
ds,create = DataSource.objects.get_or_create(key=datasource['key'])
for key in datasource.keys():
if key.startswith("_comment"):
- continue;
+ continue
setattr(ds, key, datasource[key])
ds.save()
@@ -77,7 +73,7 @@ class Command(BaseCommand):
ds,create = Group.objects.get_or_create(name=group['name'])
for key in group.keys():
if key.startswith("_comment"):
- continue;
+ continue
setattr(ds, key, group[key])
ds.save()
if 'group_permissions' in dct:
@@ -93,7 +89,7 @@ class Command(BaseCommand):
ds,create = SrtUser.objects.get_or_create(username=srtuser['name'])
for key in srtuser.keys():
if key.startswith("_comment"):
- continue;
+ continue
setattr(ds, key, srtuser[key])
ds.save()
if 'srtuser_groups' in dct:
@@ -228,7 +224,7 @@ class Command(BaseCommand):
create_dir("downloads")
return 0
- def handle(self, **options):
+ def handle(self, *args, **options):
retval = 0
retval += self._init_srt_directories()
retval += self._init_srt_fixtures()