ソースを参照

Override conf values with right type.

If the value overridden is int, convert new value to int as well.
Heikki Hokkanen 16 年 前
コミット
13b04c093a
共有1 個のファイルを変更した4 個の追加1 個の削除を含む
  1. 4
    1
      gitstats

+ 4
- 1
gitstats ファイルの表示

@@ -1086,7 +1086,10 @@ class GitStats:
1086 1086
 				key, value = v.split('=', 1)
1087 1087
 				if key not in conf:
1088 1088
 					raise 'Error: no such key "%s" in config' % key
1089
-				conf[key] = value
1089
+				if isinstance(conf[key], int):
1090
+					conf[key] = int(value)
1091
+				else:
1092
+					conf[key] = value
1090 1093
 
1091 1094
 		if len(args) < 2:
1092 1095
 			print """