try:
    from .client import *
    from .qt_widget import *
except ImportError:
    import warnings
    warnings.warn("Could not import ginga plugin, since ginga is required")

# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)

try:
    from .client import *
    from .qt_widget import *
except ImportError:
    import warnings
    warnings.warn("Could not import ginga plugin, since ginga is required")
else:
    # Register qt client
    from ...config import qt_client
    qt_client.add(GingaWidget)

Fix if ginga is not installed
Fix if ginga is not installed
  try:
      from .client import *
      from .qt_widget import *
  except ImportError:
      import warnings
      warnings.warn("Could not import ginga plugin, since ginga is required")
+ else:
+     # Register qt client
+     from ...config import qt_client
+     qt_client.add(GingaWidget)
  
- # Register qt client
- from ...config import qt_client
- qt_client.add(GingaWidget)
- 
Fix if ginga is not installed
## Code Before:
try:
    from .client import *
    from .qt_widget import *
except ImportError:
    import warnings
    warnings.warn("Could not import ginga plugin, since ginga is required")

# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)

## Instruction:
Fix if ginga is not installed
## Code After:
try:
    from .client import *
    from .qt_widget import *
except ImportError:
    import warnings
    warnings.warn("Could not import ginga plugin, since ginga is required")
else:
    # Register qt client
    from ...config import qt_client
    qt_client.add(GingaWidget)
