Explorar el Código

Override conf values with right type.

If the value overridden is int, convert new value to int as well.
Heikki Hokkanen hace 16 años
padre
commit
13b04c093a
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4
    1
      gitstats

+ 4
- 1
gitstats Ver fichero

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