Resolved some unpleasant global-scope usage and related issues

This commit is contained in:
Ciaran Gultnieks 2012-02-26 17:14:15 +00:00
parent ee268c64ec
commit e920a3ca58
7 changed files with 24 additions and 41 deletions

View file

@ -46,6 +46,7 @@ def check_market(app):
m = re.search('<dd itemprop="softwareVersion">([^>]+)</dd>', page)
if m:
html_parser = HTMLParser.HTMLParser()
version = html_parser.unescape(m.group(1))
if version == 'Varies with device':
@ -66,7 +67,7 @@ def check_market(app):
def main():
#Read configuration...
execfile('config.py')
execfile('config.py', globals())
# Parse command line...
parser = OptionParser()
@ -79,8 +80,6 @@ def main():
# Get all apps...
apps = common.read_metadata(options.verbose)
html_parser = HTMLParser.HTMLParser()
for app in apps:
if options.package and options.package != app['id']: