Various stylistic fixes
- Fix PEP8's line too long warning - Remove useless parentheses - Use triple quotes for docstring - Address pylint's 'inconsistent-return-statements' - Specify string format arguments as logging function parameters - Comment out already disabled block of code - Remove useless else (after return) - Remove useless statement - Do not import already imported module
This commit is contained in:
@@ -28,7 +28,7 @@ def unmount_device(device):
|
||||
If the given device is a symlink, the target will be checked.
|
||||
"""
|
||||
device = os.path.realpath(device)
|
||||
logger.debug('possibly unmount real path %r' % device)
|
||||
logger.debug('possibly unmount real path %r', device)
|
||||
proc = open('/proc/mounts').read()
|
||||
if device in proc:
|
||||
print('Device %s is mounted, unmounting' % device)
|
||||
|
||||
Reference in New Issue
Block a user