diff python/ppci/errors.py @ 182:e9b27f7193e3

Replace clear function by function also supported in python 3.2
author Windel Bouwman
date Sat, 18 May 2013 18:24:42 +0200
parents 5a7d37d615ee
children 6b2bec5653f1
line wrap: on
line diff
--- a/python/ppci/errors.py	Sat May 18 17:45:26 2013 +0200
+++ b/python/ppci/errors.py	Sat May 18 18:24:42 2013 +0200
@@ -43,7 +43,7 @@
    def error(self, msg, loc):
       self.addDiag(CompilerError(msg, loc))
    def clear(self):
-      self.diags.clear()
+      del self.diags[:]
    def printErrors(self, src):
       if len(self.diags) > 0:
          print('{0} Errors'.format(len(self.diags)))