> diff --git a/src/parted/decorators.py b/src/parted/decorators.py > index 2f72dd9..dce3f1d 100644 > --- a/src/parted/decorators.py > +++ b/src/parted/decorators.py > @@ -27,7 +27,11 @@ import locale > def localeC(fn, *args, **kwds): > oldlocale = locale.getlocale(locale.LC_MESSAGES) > locale.setlocale(locale.LC_MESSAGES, 'C') > - ret = fn(*args, **kwds) > + try: > + ret = fn(*args, **kwds) > + except Exception as e: > + locale.setlocale(locale.LC_MESSAGES, oldlocale) > + raise e > locale.setlocale(locale.LC_MESSAGES, oldlocale) > return ret This is an excellent discovery. ACK on the concept, but I think the following looks more natural: try: ret = fn(*args, **kwds) finally: locale.setlocale(locale.LC_MESSAGES, oldlocale) return ret That *should* work in all cases just like what you've got above and involves less exception manipulation. You're not in the gitpyparted group so if you want to move this (and the RHEL6 bug) to pyparted and attach a patch, either David or I will commit it for you. - Chris _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list