feed: Remove the for loop variable `e` for a clean namespace
authorW. Trevor King <wking@tremily.us>
Sat, 19 Jan 2013 00:13:15 +0000 (19:13 -0500)
committerW. Trevor King <wking@tremily.us>
Sat, 19 Jan 2013 00:14:39 +0000 (19:14 -0500)
Otherwise:

  >>> import rss2email.feed
  >>> print([x for x in dir(rss2email) if not x.startswith('_')])
  ['Feed', 'e']

which might confuse people ;).

Signed-off-by: W. Trevor King <wking@tremily.us>
rss2email/feed.py

index 73b182a3dcd26b3082f14044d5c2cba0494f1751..9a1c70974b0dfdf9cbaff647d8ac69de1fdf56cb 100644 (file)
@@ -57,6 +57,7 @@ _SOCKET_ERRORS = []
 for e in ['error', 'gaierror']:
     if hasattr(_socket, e):
         _SOCKET_ERRORS.append(getattr(_socket, e))
+del e  # cleanup namespace
 _SOCKET_ERRORS = tuple(_SOCKET_ERRORS)