aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/srtmain/management/commands/perf.py3
-rw-r--r--lib/srtmain/settings.py4
-rw-r--r--lib/srtmain/urls.py1
3 files changed, 3 insertions, 5 deletions
diff --git a/lib/srtmain/management/commands/perf.py b/lib/srtmain/management/commands/perf.py
index 3ed01b66..77f9f519 100644
--- a/lib/srtmain/management/commands/perf.py
+++ b/lib/srtmain/management/commands/perf.py
@@ -1,6 +1,6 @@
from django.core.management.base import BaseCommand
from django.test.client import Client
-import os, sys, re
+import sys, re
import requests
from django.conf import settings
@@ -15,7 +15,6 @@ class Command(BaseCommand):
def handle(self, *args, **options):
root_urlconf = __import__(settings.ROOT_URLCONF)
patterns = root_urlconf.urls.urlpatterns
- global full_url
for pat in patterns:
if pat.__class__.__name__ == 'RegexURLResolver':
url_root_res = str(pat).split('^')[1].replace('>', '')
diff --git a/lib/srtmain/settings.py b/lib/srtmain/settings.py
index df08ea93..0607fe9a 100644
--- a/lib/srtmain/settings.py
+++ b/lib/srtmain/settings.py
@@ -103,9 +103,9 @@ else:
import pytz
from pytz.exceptions import UnknownTimeZoneError
try:
- if pytz.timezone(zonename) is not None:
+ if pytz.timezone(zonename):
zonefilelist[hashlib.md5(open(filepath, 'rb').read()).hexdigest()] = zonename
- except UnknownTimeZoneError as ValueError:
+ except UnknownTimeZoneError:
# we expect timezone failures here, just move over
pass
except ImportError:
diff --git a/lib/srtmain/urls.py b/lib/srtmain/urls.py
index 33b15048..2f330154 100644
--- a/lib/srtmain/urls.py
+++ b/lib/srtmain/urls.py
@@ -98,7 +98,6 @@ else:
] + urlpatterns
#print("DEBUG:INSTALLED_URL_PATTERNS:%s,%s" % (SRT_MAIN_APP,urlpatterns))
-import os
currentdir = os.path.dirname(__file__)
from pprint import pformat