statprof: fix flake8 warnings
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 14 Aug 2016 19:13:32 -0700
changeset 30254 ad4c0236168d
parent 30253 b032a7b676c6
child 30255 f42cd5434cc2
statprof: fix flake8 warnings My local flake8 hook informed me of these warnings in the upstream code. Fix them.
mercurial/statprof.py
--- a/mercurial/statprof.py	Tue Nov 01 18:54:03 2016 -0700
+++ b/mercurial/statprof.py	Sun Aug 14 19:13:32 2016 -0700
@@ -104,11 +104,10 @@
 # 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 @@
             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