X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfa%2Futil%2Fstorage.py;h=9033434f6cf8d146df5d147a29a2e147db0b5895;hp=89a250993dc968c4ec999f42f25bfe1c72716a3c;hb=ecc85e0b923922cf7117d29b380f5284edb88f21;hpb=fad16c7d54b658b37a9b42fbee47b0d4f51cb8ec diff --git a/sfa/util/storage.py b/sfa/util/storage.py index 89a25099..9033434f 100644 --- a/sfa/util/storage.py +++ b/sfa/util/storage.py @@ -19,8 +19,8 @@ class SimpleStorage(dict): db_file = open(self.db_filename, 'r') dict.__init__(self, eval(db_file.read())) elif os.path.exists(self.db_filename) and not os.path.isfile(self.db_filename): - raise IOError, '%s exists but is not a file. please remove it and try again' \ - % self.db_filename + raise IOError('%s exists but is not a file. please remove it and try again' \ + % self.db_filename) else: self.write() self.load() @@ -49,8 +49,8 @@ class XmlStorage(SimpleStorage): xml = XML(self.db_filename) dict.__init__(self, xml.todict()) elif os.path.exists(self.db_filename) and not os.path.isfile(self.db_filename): - raise IOError, '%s exists but is not a file. please remove it and try again' \ - % self.db_filename + raise IOError('%s exists but is not a file. please remove it and try again' \ + % self.db_filename) else: self.write() self.load()