base: Fix uninitialized variable in Flag
[gem5.git] / util / stats / chart.py
index 369a57fc6348f292196bbec4aad24c448a4daab6..cc5eccf134253a360f7ead7cbe5d901f41138bc8 100644 (file)
@@ -23,9 +23,6 @@
 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# Authors: Nathan Binkert
-#          Lisa Hsu
 
 class ChartOptions(object):
     defaults = { 'chart_size' : (8, 4),
@@ -57,15 +54,15 @@ class ChartOptions(object):
     def update(self, options=None, **kwargs):
         if options is not None:
             if not isinstance(options, ChartOptions):
-                raise AttributeError, \
-                      'attribute options of type %s should be %s' % \
-                      (type(options), ChartOptions)
+                raise AttributeError(
+                    'attribute options of type %s should be %s' %
+                    (type(options), ChartOptions))
             self.options.update(options.options)
 
-        for key,value in kwargs.iteritems():
+        for key,value in kwargs.items():
             if key not in ChartOptions.defaults:
-                raise AttributeError, \
-                      "%s instance has no attribute '%s'" % (type(self), key)
+                raise AttributeError(
+                    "%s instance has no attribute '%s'" % (type(self), key))
             self.options[key] = value
 
     def __getattr__(self, attr):
@@ -75,8 +72,7 @@ class ChartOptions(object):
         if attr in ChartOptions.defaults:
             return ChartOptions.defaults[attr]
 
-        raise AttributeError, \
-              "%s instance has no attribute '%s'" % (type(self), attr)
+        raise AttributeError("%s instance has no attribute '%s'" % (type(self), attr))
 
     def __setattr__(self, attr, value):
         if attr in ChartOptions.defaults: