From 0fc2ff4465d741823b3dceebcfcf3a98a0081522 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 4 Oct 2012 08:33:32 -0400 Subject: [PATCH] Cleanup global module configuration. --- rss2email.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rss2email.py b/rss2email.py index 216c13d..3919bd7 100755 --- a/rss2email.py +++ b/rss2email.py @@ -51,20 +51,20 @@ import urllib.request as _urllib_request import xml.dom.minidom as _minidom import xml.sax.saxutils as _saxutils -unix = 0 +UNIX = False try: import fcntl as _fcntl -# A pox on SunOS file locking methods - if (sys.platform.find('sunos') == -1): - unix = 1 + # A pox on SunOS file locking methods + if 'sunos' not in sys.platform: + UNIX = True except: pass import feedparser as _feedparser import html2text as _html2text -hash = hashlib.md5 -urllib2.install_opener(urllib2.build_opener()) + +_urllib_request.install_opener(_urllib_request.build_opener()) class Config (_configparser.ConfigParser): -- 2.26.2