Author: reinhard Date: 2008-04-28 06:06:04 -0500 (Mon, 28 Apr 2008) New Revision: 9870
Modified: trunk/gnue-common/src/datasources/readgsd.py Log: Fixed exception handling code. Modified: trunk/gnue-common/src/datasources/readgsd.py =================================================================== --- trunk/gnue-common/src/datasources/readgsd.py 2008-03-31 20:30:10 UTC (rev 9869) +++ trunk/gnue-common/src/datasources/readgsd.py 2008-04-28 11:06:04 UTC (rev 9870) @@ -195,6 +195,12 @@ import their schema/data according to the command line options. """ + self.myfunc('foo', 'bar', 1, 2, 99, three=3, four=4) + self.myfunc('foo', 'bar', one=1, two=2) + self.myfunc('foo', 'bar', two=2, one=1) + self.myfunc('foo', 'bar', four=4, two=2, three=3, one=1) + self.otherfunc() + self.__check_options() self.__load_input_files() @@ -206,7 +212,24 @@ if proceed and self.__do_data: self.__import_data() + def __repr__(self): + return "the object" + from gnue.common.base.log import logged_f_n, deprecated_f_n + [EMAIL PROTECTED]('gnue.foo') + @deprecated_f_n('gnue.depa') + def myfunc(self, foo, bar, one=None, two=None, *args, **kwargs): + print foo, bar, one, two, args, kwargs + + [EMAIL PROTECTED]('gnue.bar') + @deprecated_f_n('gnue.depb') + def otherfunc(self): + from gnue.common.base.log import stack_n + stack_n('gnue.freak', 'I am here') + + myfunc = logged_f_n('gnue.xxx')(myfunc) + otherfunc = logged_f_n('gnue.yyy')(otherfunc) + # ------------------------------------------------------------------------- # Check the command line arguments # ------------------------------------------------------------------------- @@ -406,7 +429,7 @@ # Are all fields in the row defined by the table if not rowfields.issubset(fields[item.tablename.lower()]): raise InvalidFieldsError, (item.tablename, n, - rowfields.difference(fields[item.tablename])) + rowfields.difference(fields[item.tablename.lower()])) # Order the tables so the do not violate constraints references = {} _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue