Repository: hyperledger/aries-cloudagent-python

Issue:
Alice demo fails
```
Alice      | 2020-07-29 16:13:48,135 aries_cloudagent.commands.start ERROR Exception during startup:
Alice      | 
Alice      | Shutting down
Alice      | Traceback (most recent call last):
Alice      |   File "/home/indy/aries_cloudagent/commands/start.py", line 77, in init
Alice      |     await startup
Alice      |   File "/home/indy/aries_cloudagent/commands/start.py", line 27, in start_app
Alice      |     await conductor.start()
Alice      |   File "/home/indy/aries_cloudagent/core/conductor.py", line 179, in start
Alice      |     public_did = (await wallet.get_public_did()).did
Alice      | AttributeError: 'NoneType' object has no attribute 'did'
```


Discussion:

Resolving patch:
diff --git a/aries_cloudagent/core/conductor.py b/aries_cloudagent/core/conductor.py
--- a/aries_cloudagent/core/conductor.py
+++ b/aries_cloudagent/core/conductor.py
@@ -176,14 +176,14 @@ async def start(self) -> None:
 
         # Get public did
         wallet: BaseWallet = await context.inject(BaseWallet)
-        public_did = (await wallet.get_public_did()).did
+        public_did = await wallet.get_public_did()
 
         # Show some details about the configuration to the user
         LoggingConfigurator.print_banner(
             default_label,
             self.inbound_transport_manager.registered_transports,
             self.outbound_transport_manager.registered_transports,
-            public_did,
+            public_did.did if public_did else None,
             self.admin_server,
         )
 


Test patch:
diff --git a/aries_cloudagent/core/tests/test_conductor.py b/aries_cloudagent/core/tests/test_conductor.py
--- a/aries_cloudagent/core/tests/test_conductor.py
+++ b/aries_cloudagent/core/tests/test_conductor.py
@@ -124,6 +124,39 @@ async def test_startup(self):
             mock_inbound_mgr.return_value.stop.assert_awaited_once_with()
             mock_outbound_mgr.return_value.stop.assert_awaited_once_with()
 
+    async def test_startup_no_public_did(self):
+        builder: ContextBuilder = StubContextBuilder(self.test_settings)
+        conductor = test_module.Conductor(builder)
+
+        with async_mock.patch.object(
+            test_module, "InboundTransportManager", autospec=True
+        ) as mock_inbound_mgr, async_mock.patch.object(
+            test_module, "OutboundTransportManager", autospec=True
+        ) as mock_outbound_mgr, async_mock.patch.object(
+            test_module, "LoggingConfigurator", autospec=True
+        ) as mock_logger:
+
+            await conductor.setup()
+
+            mock_inbound_mgr.return_value.setup.assert_awaited_once()
+            mock_outbound_mgr.return_value.setup.assert_awaited_once()
+
+            mock_inbound_mgr.return_value.registered_transports = {}
+            mock_outbound_mgr.return_value.registered_transports = {}
+
+            # Doesn't raise
+            await conductor.start()
+
+            mock_inbound_mgr.return_value.start.assert_awaited_once_with()
+            mock_outbound_mgr.return_value.start.assert_awaited_once_with()
+
+            mock_logger.print_banner.assert_called_once()
+
+            await conductor.stop()
+
+            mock_inbound_mgr.return_value.stop.assert_awaited_once_with()
+            mock_outbound_mgr.return_value.stop.assert_awaited_once_with()
+
     async def test_stats(self):
         builder: ContextBuilder = StubContextBuilder(self.test_settings)
         conductor = test_module.Conductor(builder)