Parcourir la source

Override conf values with right type.

If the value overridden is int, convert new value to int as well.
Heikki Hokkanen il y a 16 ans
Parent
révision
13b04c093a
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4
    1
      gitstats

+ 4
- 1
gitstats Voir le fichier

@@ -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 """