Patchwork [2,of,7,V3] statprof: fix flake8 warnings

login
register
mail settings
Submitter Gregory Szorc
Date Nov. 2, 2016, 2:11 a.m.
Message ID <4f740964f8843bdcb08a.1478052666@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/17265/
State Accepted
Headers show

Comments

Gregory Szorc - Nov. 2, 2016, 2:11 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1471227212 25200
#      Sun Aug 14 19:13:32 2016 -0700
# Node ID 4f740964f8843bdcb08a668ae1cf37ef153eba25
# Parent  60b2d821b58fb1209f7a5a3aac95e66a61e503ea
statprof: fix flake8 warnings

My local flake8 hook informed me of these warnings in the upstream
code. Fix them.

Patch

diff --git a/mercurial/statprof.py b/mercurial/statprof.py
--- a/mercurial/statprof.py
+++ b/mercurial/statprof.py
@@ -104,11 +104,10 @@  main thread's work patterns.
 # no-check-code
 from __future__ import division
 
-import inspect, json, os, signal, tempfile, sys, getopt, threading, traceback
+import inspect, json, os, signal, tempfile, sys, getopt, threading
 import time
 from collections import defaultdict
 from contextlib import contextmanager
-from subprocess import call
 
 __all__ = ['start', 'stop', 'reset', 'display', 'profile']
 
@@ -328,7 +327,7 @@  def save_data(path=None):
             file.write(time + '\0' + '\0'.join(sites) + '\n')
 
         file.close()
-    except (IOError, OSError) as ex:
+    except (IOError, OSError):
         # The home directory probably didn't exist, or wasn't writable. Oh well.
         pass