Since these two statements are almost the same, can you use a loop?
```python
for system in ('cms', 'lms'):
    sh('python manage.py {system} {action} --traceback --settings={env} --pythonpath=. {arg_options}'.format(
        system=system, action=action, env=env, arg_option=arg_options)
    )