aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-01-14 20:33:11 +0000
committerDavid Reyna <David.Reyna@windriver.com>2019-01-14 21:57:51 -0800
commit5da8557f159b0dab9ef7cbe106a1e14d66c5fc2b (patch)
treeaf8a4eb01e1cbd6509e84ca28d8e67eff85d8669
parent24f2a07d2febee776650cd09a977d57dbea3261c (diff)
downloadsrtool-5da8557f159b0dab9ef7cbe106a1e14d66c5fc2b.tar.gz
srtool-5da8557f159b0dab9ef7cbe106a1e14d66c5fc2b.tar.bz2
srtool-5da8557f159b0dab9ef7cbe106a1e14d66c5fc2b.zip
pylint srtmain
-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