Sfoglia il codice sorgente

Override conf values with right type.

If the value overridden is int, convert new value to int as well.
Heikki Hokkanen 16 anni fa
parent
commit
13b04c093a
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4
    1
      gitstats

+ 4
- 1
gitstats Vedi File

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