From b78fdca4199c63f432ba036b68a65b5bc84883bb Mon Sep 17 00:00:00 2001 From: Jonathan Tsai Date: Mon, 1 Aug 2022 06:23:12 +0000 Subject: [PATCH] update try except syntax for Python 3 --- lib/django_dbshell_plus/management/commands/dbshell_plus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/django_dbshell_plus/management/commands/dbshell_plus.py b/lib/django_dbshell_plus/management/commands/dbshell_plus.py index 720f800..5cd7710 100644 --- a/lib/django_dbshell_plus/management/commands/dbshell_plus.py +++ b/lib/django_dbshell_plus/management/commands/dbshell_plus.py @@ -1,8 +1,8 @@ import errno import subprocess -from django.db import connections from django.core.management.commands import dbshell +from django.db import connections class Command(dbshell.Command): @@ -20,7 +20,7 @@ def handle(self, **options): try: getattr(self, cmd)(connection) return - except OSError, e: + except OSError as e: if e.errno != errno.ENOENT: self.stderr.write("Could not start %s: %s" % (cmd, str(e)))