From: W. Trevor King Date: Tue, 29 May 2012 12:48:36 +0000 (-0400) Subject: Oops, Calibrator.save_results should be a static method. X-Git-Tag: 0.8~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f541163fca6e7644a631b270143df35374dabb13;p=calibcant.git Oops, Calibrator.save_results should be a static method. Without this fix, you get errors like: Traceback (most recent call last): File "/usr/bin/calibcant-calibrate.py-2.7", line 46, in sys.exit(main(sys.argv[1:])) File "/usr/bin/calibcant-calibrate.py-2.7", line 36, in main k,k_s,data = calibrator.calibrate(filename=filename) File "/usr/lib/python2.7/site-packages/calibcant/calibrate.py", line 495, in calibrate spring_constant=k, spring_constant_deviation=k_s, **data) TypeError: save_results() got multiple values for keyword argument 'filename' --- diff --git a/calibcant/calibrate.py b/calibcant/calibrate.py index 964ee24..b6a304b 100644 --- a/calibcant/calibrate.py +++ b/calibcant/calibrate.py @@ -594,4 +594,4 @@ class Calibrator (object): data[name].append(loader(group=cwg)) return data -Calibrator.save_results = _save_results +Calibrator.save_results = staticmethod(_save_results)