From: W. Trevor King Date: Thu, 4 Oct 2012 12:33:32 +0000 (-0400) Subject: Cleanup global module configuration. X-Git-Tag: v3.0~72^2~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0fc2ff4465d741823b3dceebcfcf3a98a0081522;p=rss2email.git Cleanup global module configuration. --- 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):