Bläddra i källkod

Raise KeyError instead of a string exception.

Fixes debian bug #585225:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=585225
Heikki Hokkanen 15 år sedan
förälder
incheckning
2c38acfd05
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      gitstats

+ 1
- 1
gitstats Visa fil

@@ -1112,7 +1112,7 @@ class GitStats:
1112 1112
 			if o == '-c':
1113 1113
 				key, value = v.split('=', 1)
1114 1114
 				if key not in conf:
1115
-					raise 'Error: no such key "%s" in config' % key
1115
+					raise KeyError('no such key "%s" in config' % key)
1116 1116
 				if isinstance(conf[key], int):
1117 1117
 					conf[key] = int(value)
1118 1118
 				else: