[orca] Control an exception for avoiding to show a Python's traceback to the user. This is related with the
- From: Juanje Ojeda Croissier <jojeda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Control an exception for avoiding to show a Python's traceback to the user. This is related with the
- Date: Tue, 27 Jul 2010 18:08:35 +0000 (UTC)
commit da4a174b3e8c87357959efefecdb0193e1983425
Author: Juanje Ojeda <jojeda emergya es>
Date: Tue Jul 27 19:56:32 2010 +0200
Control an exception for avoiding to show a Python's traceback to the user.
This is related with the 25th comentary of bgo #596108
src/orca/orca.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 06de5b4..038fc79 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -1988,7 +1988,15 @@ def main():
userPrefsDir = os.path.join(xdg_data_home, "orca")
oldUserPrefsDir = os.path.join(os.environ["HOME"], ".orca")
if os.path.exists(oldUserPrefsDir):
- os.renames(oldUserPrefsDir, userPrefsDir)
+ try:
+ os.renames(oldUserPrefsDir, userPrefsDir)
+ except:
+ print "It seems like you are trying to migrate your " \
+ + "preferences but the new location is not " \
+ + "empty.\n" \
+ + "Probably it was already migrated. \n" \
+ + "Please, check it before you try again."
+ die(2)
settings.userPrefsDir = userPrefsDir
if opt in ("-e", "--enable"):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]