corrected line lenghts
authorPaul Tonelli <paul.tonelli@logilab.fr>
Wed, 13 Mar 2013 17:44:26 +0100
changeset 74 442b3b154777
parent 73 dae7b424b347
child 75 aaa6740c7950
corrected line lenghts
_states/tmp_state.py
--- a/_states/tmp_state.py	Wed Mar 13 17:22:44 2013 +0100
+++ b/_states/tmp_state.py	Wed Mar 13 17:44:26 2013 +0100
@@ -79,7 +79,7 @@
 def resized(name, size=0):
     '''
     Resize partition and filesystem on a file with an ext* fs whenever
-    possible (size in Mb) and check the integrity (for ext* fs)
+    possible and check the integrity (for ext* fs)
 
     implemented checks:
         - check if file exists
@@ -118,7 +118,8 @@
     info = __salt__['tmp_extfs.fsck'](name)
     if info['retcode']:
         ret['result'] = False
-        ret['comment'] = 'Error while checking fs {0}: {1}'.format(name, info['stderr'])
+        ret['comment'] = 'Error while checking fs {0}: {1}'.format(name,
+                info['stderr'])
         return ret
     change_value = new_size - current_size * block_size
     minimum_size = int(__salt__['tmp_extfs.resize'](name, options='-P')['stdout'].split(':')[-1])
@@ -140,13 +141,15 @@
             size=str_size)
     if info['retcode']:
         ret['result'] = False
-        ret['comment'] = 'Error while resizing {0}: {1}'.format(name, info['stderr'])
+        ret['comment'] = 'Error while resizing {0}: {1}'.format(name,
+                info['stderr'])
         return ret
-    if str_size:
+    if str_size: 
         info = __salt__['cmd.run_all']('fallocate -l ' + str(new_size /
             block_size) + ' ' + name )
     ret['changes']['resized'] = True
-    ret['comment'] = 'Resized filesystem {0} from {1} to {2}'.format(name, str(current_size * block_size), str(max(new_size, minimum_size)))
+    ret['comment'] = 'Resized filesystem {0} from {1} to {2}'.format(name,
+            str(current_size * block_size), str(max(new_size, minimum_size)))
     return ret
 
 def _has_enough_free_space(fs, space):