Skip to content

Commit

Permalink
Bug 1059811 - pyflakes: Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Morley committed Jan 16, 2015
1 parent b0d1c0c commit 6bf711f
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 21 deletions.
2 changes: 0 additions & 2 deletions tests/conftest.py
Expand Up @@ -312,8 +312,6 @@ def eleven_jobs_stored(jm, sample_data, sample_resultset):
resultset_index = 0

# Modify job structure to sync with the resultset sample data
job_guid = blob['job']['job_guid']

if 'sources' in blob:
del blob['sources']

Expand Down
4 changes: 0 additions & 4 deletions tests/etl/test_perf_data_adapters.py
Expand Up @@ -12,10 +12,6 @@ def test_adapt_and_load():

talos_perf_data = SampleData.get_talos_perf_data()

ref_data = {
"test": 1
}

tda = TalosDataAdapter()

result_count = 0
Expand Down
4 changes: 0 additions & 4 deletions tests/model/derived/test_objectstore_model.py
Expand Up @@ -135,10 +135,6 @@ def test_ingest_sample_data(jm, sample_data, sample_resultset, mock_log_parser):
blobs.append(job)

jm.store_job_data(blobs)

# process 10 rows at a time
remaining = resultset_count

jm.process_objects(resultset_count, raise_errors=True)

job_rows = jm.get_jobs_dhub().execute(
Expand Down
2 changes: 0 additions & 2 deletions tests/model/derived/test_refdata.py
Expand Up @@ -352,8 +352,6 @@ def test_get_hg_repository_version(refdata, mock_urllib):

def test_update_repo_version_if_old(refdata, old_version_repository, mock_urllib):
"""test repo version is updated if a new one is available"""

time_now = time.time()
repo_id, old_version = old_version_repository

refdata.update_repository_version(repo_id)
Expand Down
2 changes: 1 addition & 1 deletion tests/webapp/api/test_bug_job_map_api.py
Expand Up @@ -50,7 +50,7 @@ def test_create_bug_job_map(eleven_jobs_processed, mock_message_broker, jm):
u"type": u"manual"
}

resp = client.post(
client.post(
reverse("bug-job-map-list", kwargs={"project": jm.project}),
bug_job_map_obj
)
Expand Down
2 changes: 1 addition & 1 deletion treeherder/etl/mixins.py
Expand Up @@ -37,7 +37,7 @@ def extract(self, url):
handler = gzip.GzipFile(fileobj=buf)

return json.loads(handler.read())
except Exception, e:
except Exception:
logger.error('Error fetching {0}'.format(url), exc_info=True)
return None

Expand Down
2 changes: 1 addition & 1 deletion treeherder/etl/pushlog.py
Expand Up @@ -182,7 +182,7 @@ def run(self, source_url, repository, revision):
"Got no content response for missing resultsets: {0}".format(
source_url)
)
except Exception as ex:
except Exception:
logger.exception("error loading missing resultsets: {0}".format(
source_url
))
Expand Down
2 changes: 1 addition & 1 deletion treeherder/model/derived/jobs.py
Expand Up @@ -1558,7 +1558,7 @@ def _remove_existing_jobs(self, data):
# index this place in the ``data`` object
data_idx.append(job_guid)

except Exception as e:
except Exception:
data_idx.append("skipped")
# it will get caught later in ``load_job_data``
# adding the guid as "skipped" will mean it won't be found
Expand Down
7 changes: 3 additions & 4 deletions treeherder/webapp/api/performance_data.py
Expand Up @@ -44,7 +44,7 @@ def get_signatures_from_properties(self, request, project, jm, pk=None):

try:
props = request.QUERY_PARAMS.dict()
except Exception as e:
except Exception:
return Response("incorrect parameters", 400)

signatures = jm.get_signatures_from_properties(props)
Expand All @@ -62,7 +62,7 @@ def get_signature_properties(self, request, project, jm, pk=None):
"""
try:
signatures = request.QUERY_PARAMS.getlist("signatures")
except Exception as e:
except Exception:
return Response("incorrect parameters", 400)

if not signatures:
Expand All @@ -72,7 +72,6 @@ def get_signature_properties(self, request, project, jm, pk=None):

return Response(data)


@link()
@with_jobs
def get_performance_data(self, request, project, jm, pk=None):
Expand All @@ -86,7 +85,7 @@ def get_performance_data(self, request, project, jm, pk=None):
try:
signatures = request.QUERY_PARAMS.getlist("signatures")
interval_seconds = abs(int(request.QUERY_PARAMS.get("interval_seconds", 0)))
except Exception as e:
except Exception:
return Response("incorrect parameters", 400)

if not signatures:
Expand Down
1 change: 0 additions & 1 deletion treeherder/webapp/api/utils.py
Expand Up @@ -170,7 +170,6 @@ def wrap_oauth(cls, *args, **kwargs):
oauth_body_hash = parameters.get('oauth_body_hash', None)
oauth_signature = parameters.get('oauth_signature', None)
oauth_consumer_key = parameters.get('oauth_consumer_key', None)
oauth_token = parameters.get('oauth_token', None)

if not oauth_body_hash or not oauth_signature or not oauth_consumer_key:

Expand Down

0 comments on commit 6bf711f

Please sign in to comment.