I guess this can be simplified with 

```python
globalopts['endpoint'] = os.environ.get('CIRCUSCTL_ENDPOINT', DEFAULT_ENDPOINT_DEALER) 
```