diff --git a/requirements.txt b/requirements.txt index 114dacb..eea965a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -eveapi ordereddict -jinja2 +jinja2==2.7.3 argparse +eveapi>=1.2.6 \ No newline at end of file diff --git a/standings/cli.py b/standings/cli.py index 4c8d327..0315605 100644 --- a/standings/cli.py +++ b/standings/cli.py @@ -3,7 +3,10 @@ import sys import os from argparse import ArgumentParser -from ConfigParser import ConfigParser +try: + from configparser import ConfigParser +except ImportError: + from ConfigParser import ConfigParser from standings import Standings @@ -38,7 +41,7 @@ def main(): conf = load_config(ns.config) else: conf = load_config() - if not conf.keyid or not conf.vcode: + if not hasattr(conf, 'keyid') or not hasattr(conf, 'vcode') or not conf.keyid or not conf.vcode: sys.stderr.write('Key ID or vCode is missing, please provide both on the command line or in the config file\n') parser.print_help() sys.exit(1) @@ -57,3 +60,7 @@ def main(): sys.stdout.write(output) sys.exit(0) + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/standings/core.py b/standings/core.py index 8318748..8b43e3a 100644 --- a/standings/core.py +++ b/standings/core.py @@ -48,7 +48,6 @@ class Standings(object): standings = OrderedDict((x, []) for x in ['Excellent', 'Good', 'Neutral', 'Bad', 'Terrible']) self._parse_list(res.allianceContactList, standings) self._parse_list(res.corporateContactList, standings) - print standings for x in ['Excellent', 'Good', 'Neutral', 'Bad', 'Terrible']: standings[x] = sorted(standings[x], key=lambda v: -int(v[3])) self._standings_cache = standings