Repository: obspy/obspy

Issue:
"obspy.clients.seedlink.basic_client.Client" raises AttributeError when debug option is True
I run the following code to get waveform data from my SeedLink server:

```python
from obspy import UTCDateTime
from obspy.clients.seedlink.basic_client import Client

tend = UTCDateTime()
tstart = tend - 60

client = Client('127.0.0.1', port=18000, debug=True)
st = client.get_waveforms('VG', 'MEPAS', '00', 'HHZ', tstart, tend)

print(st)
```

When creating `Client` instance with `debug=True`, I got the following error:

```
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 0
INFO: obspy.clients.seedlink [127.0.0.1:18000]:network socket opened
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:sending: HELLO
INFO: obspy.clients.seedlink [127.0.0.1:18000]:connected to: 'SeedLink v3.2 (2014.071)'
INFO: obspy.clients.seedlink [127.0.0.1:18000]:sending: requesting INFO level STATIONS
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-101
Traceback (most recent call last):
  File "get_waveforms.py", line 9, in <module>
    st = client.get_waveforms('VG', 'MEPAS', '00', 'HHZ', tstart, tend)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/basic_client.py", line 150, in get_waveforms
    level='station', cache=True)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/basic_client.py", line 286, in get_info
    self._slclient.run(packet_handler=self._packet_handler)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/slclient.py", line 249, in run
    terminate = packet_handler(count, slpack)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/basic_client.py", line 343, in _packet_handler
    print("Complete INFO:" + self.slconn.get_info_string())
AttributeError: 'Client' object has no attribute 'slconn'
```

Output when leaving debug to default value:

```
1 Trace(s) in Stream:
VG.MEPAS.00.HHZ | 2020-10-19T14:40:48.330000Z - 2020-10-19T14:41:48.330000Z | 100.0 Hz, 6001 samples
```
ObsPy version: 1.2.2

I think this just a minor bug in the following line:

https://github.com/obspy/obspy/blob/4217ce60a296af9f14ec704befb6c12c3a3e081e/obspy/clients/seedlink/basic_client.py#L339

It should be `self._slclient.slconn.get_info_string()`.
"obspy.clients.seedlink.basic_client.Client" raises AttributeError when debug option is True
I run the following code to get waveform data from my SeedLink server:

```python
from obspy import UTCDateTime
from obspy.clients.seedlink.basic_client import Client

tend = UTCDateTime()
tstart = tend - 60

client = Client('127.0.0.1', port=18000, debug=True)
st = client.get_waveforms('VG', 'MEPAS', '00', 'HHZ', tstart, tend)

print(st)
```

When creating `Client` instance with `debug=True`, I got the following error:

```
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 0
INFO: obspy.clients.seedlink [127.0.0.1:18000]:network socket opened
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:sending: HELLO
INFO: obspy.clients.seedlink [127.0.0.1:18000]:connected to: 'SeedLink v3.2 (2014.071)'
INFO: obspy.clients.seedlink [127.0.0.1:18000]:sending: requesting INFO level STATIONS
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-102
-102
DEBUG: obspy.clients.seedlink [127.0.0.1:18000]:primary loop pass 0, state 1
-101
Traceback (most recent call last):
  File "get_waveforms.py", line 9, in <module>
    st = client.get_waveforms('VG', 'MEPAS', '00', 'HHZ', tstart, tend)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/basic_client.py", line 150, in get_waveforms
    level='station', cache=True)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/basic_client.py", line 286, in get_info
    self._slclient.run(packet_handler=self._packet_handler)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/slclient.py", line 249, in run
    terminate = packet_handler(count, slpack)
  File "/home/iori/GitLab/bma/venv/lib/python3.6/site-packages/obspy/clients/seedlink/basic_client.py", line 343, in _packet_handler
    print("Complete INFO:" + self.slconn.get_info_string())
AttributeError: 'Client' object has no attribute 'slconn'
```

Output when leaving debug to default value:

```
1 Trace(s) in Stream:
VG.MEPAS.00.HHZ | 2020-10-19T14:40:48.330000Z - 2020-10-19T14:41:48.330000Z | 100.0 Hz, 6001 samples
```
ObsPy version: 1.2.2

I think this just a minor bug in the following line:

https://github.com/obspy/obspy/blob/4217ce60a296af9f14ec704befb6c12c3a3e081e/obspy/clients/seedlink/basic_client.py#L339

It should be `self._slclient.slconn.get_info_string()`.


Discussion:

Resolving patch:
diff --git a/obspy/clients/seedlink/basic_client.py b/obspy/clients/seedlink/basic_client.py
--- a/obspy/clients/seedlink/basic_client.py
+++ b/obspy/clients/seedlink/basic_client.py
@@ -340,7 +340,8 @@ def _packet_handler(self, count, slpack):
             return False
         elif type_ == SLPacket.TYPE_SLINFT:
             if self.debug:
-                print("Complete INFO:" + self.slconn.get_info_string())
+                print("Complete INFO:",
+                      self._slclient.slconn.get_info_string())
             return False
 
         # process packet data


Test patch: