/rev/cefcb223c892
changeset: 1294:cefcb223c892
user: Martin Geisler <[email protected]>
date: Fri Oct 16 19:12:29 2009 +0200
summary: benchmark: cleanup if-statements
diffstat:
apps/benchmark.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (46 lines):
diff -r 6952e7a560f8 -r cefcb223c892 apps/benchmark.py
--- a/apps/benchmark.py Fri Oct 16 19:08:46 2009 +0200
+++ b/apps/benchmark.py Fri Oct 16 19:12:29 2009 +0200
@@ -153,7 +153,7 @@
(options, args) = parser.parse_args()
-if len(args) == 0:
+if not args:
parser.error("you must specify a config file")
id, players = load_config(args[0])
@@ -181,7 +181,7 @@
# Identify the additional mixins.
actual_mixins = []
-if options.mixins != "":
+if options.mixins:
actual_mixins = [mixins[mixin] for mixin in options.mixins.split(',')]
@@ -203,7 +203,7 @@
def update_args(runtime, options):
args = {}
- if options.args != "":
+ if options.args:
for arg in options.args.split(','):
id, value = arg.split('=')
args[id] = long(value)
@@ -219,13 +219,13 @@
benchmark = SequentialBenchmark
needed_data = ""
-if options.needed_data != "":
+if options.needed_data:
file = open(options.needed_data, 'r')
for l in file:
needed_data += l
needed_data = eval(needed_data)
-if options.needed_data != "" and options.pc != "":
+if options.needed_data and options.pc:
bases = (benchmark, NeededDataBenchmarkStrategy, operation_arity, object)
options.pc = eval(options.pc)
else:
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk