summaryrefslogtreecommitdiff
path: root/scripts/migration
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/migration')
-rwxr-xr-xscripts/migration/0.8.2/migrate.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/migration/0.8.2/migrate.py b/scripts/migration/0.8.2/migrate.py
index adc0f7d9..fe612221 100755
--- a/scripts/migration/0.8.2/migrate.py
+++ b/scripts/migration/0.8.2/migrate.py
@@ -85,10 +85,22 @@ def _parse_args():
parser.add_argument(
'--log-file',
help='the log file to use')
+ parser.add_argument(
+ '--pdb', action='store_true',
+ help='escape to pdb shell in case of exception')
return parser.parse_args()
+def _enable_pdb():
+ import sys
+ from IPython.core import ultratb
+ sys.excepthook = ultratb.FormattedTB(
+ mode='Verbose', color_scheme='Linux', call_pdb=1)
+
+
if __name__ == '__main__':
args = _parse_args()
+ if args.pdb:
+ _enable_pdb()
_configure_logger(args.log_file)
migrate(args, TARGET_VERSION)