| Total Complexity | 2 | 
| Total Lines | 12 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | """Translate cli commands to non-cli code."""  | 
            ||
| 10 | class WebAPI: # pylint: disable=too-few-public-methods  | 
            ||
| 11 | """An API for the command-line interface."""  | 
            ||
| 12 | |||
| 13 | @classmethod  | 
            ||
| 14 | def update(cls):  | 
            ||
| 15 | """Call the method to update the Web UI."""  | 
            ||
| 16 | url = "http://localhost:8181/api/kytos/core/update_ui"  | 
            ||
| 17 | try:  | 
            ||
| 18 | requests.get(url)  | 
            ||
| 19 | except(HTTPError, URLError):  | 
            ||
| 20 |             LOG.error("Error while updating the web ui") | 
            ||
| 21 |         LOG.info("Web UI updated.") | 
            ||
| 22 |