Conditions | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 4.3145 |
1 | 1 | from plugin.core.libraries.helpers.storage import StorageHelper |
|
33 | 1 | @classmethod |
|
34 | def remove(cls, path): |
||
35 | """Remove path from `sys.path` if it exists |
||
36 | |||
37 | :type path: str |
||
38 | """ |
||
39 | |||
40 | if path not in sys.path: |
||
41 | return False |
||
42 | |||
43 | sys.path.remove(path) |
||
44 | |||
45 | log.debug('Removed path: %r', StorageHelper.to_relative_path(path)) |
||
46 | return True |
||
47 |