[PATCH 2 of 7 V3] statprof: fix flake8 warnings

Gregory Szorc gregory.szorc at gmail.com
Tue Nov 1 22:11:06 EDT 2016


# HG changeset patch
# User Gregory Szorc <gregory.szorc at 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.

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
 


More information about the Mercurial-devel mailing list