def line(name, content=None, match=None, mode=None, location=None, before=None, after=None, show_changes=True, backup=False, quiet=False, indent=True, create=False, user=None, group=None, file_mode=None):
 name = os.path.expanduser(name)
 ret = {'name': name, 'changes': {}, 'pchanges': {}, 'result': True, 'comment': ''}
 if (not name):
  return _error(ret, 'Must provide name to file.line')
 if (create and (not os.path.isfile(name))):
  managed(name, create=create, user=user, group=group, mode=file_mode)
 (check_res, check_msg) = _check_file(name)
 if (not check_res):
  return _error(ret, check_msg)
 mode = ((mode and mode.lower()) or mode)
 if (mode is None):
  return _error(ret, 'Mode was not defined. How to process the file?')
 modeswithemptycontent = ['delete']
 if ((mode not in modeswithemptycontent) and (content is None)):
  return _error(ret, 'Content can only be empty if mode is {0}'.format(modeswithemptycontent))
 del modeswithemptycontent
 changes = __salt__['file.line'](name, content, match=match, mode=mode, location=location, before=before, after=after, show_changes=show_changes, backup=backup, quiet=quiet, indent=indent)
 if changes:
  ret['pchanges']['diff'] = changes
  if __opts__['test']:
   ret['result'] = None
   ret['comment'] = 'Changes would be made:\ndiff:\n{0}'.format(changes)
  else:
   ret['result'] = True
   ret['comment'] = 'Changes were made'
   ret['changes'] = {'diff': changes}
 else:
  ret['result'] = True
  ret['comment'] = 'No changes needed to be made'
 return ret

def line ( name , content = None , match = None , mode = None , location = None , before = None , after = None , show_changes = True , backup = False , quiet = False , indent = True , create = False , user = None , group = None , file_mode = None ) : name = os . path . expanduser ( name ) ret = { 'name' : name , 'changes' : { } , 'pchanges' : { } , 'result' : True , 'comment' : '' } if ( not name ) : return _error ( ret , 'Must provide name to file.line' ) if ( create and ( not os . path . isfile ( name ) ) ) : managed ( name , create = create , user = user , group = group , mode = file_mode ) ( check_res , check_msg ) = _check_file ( name ) if ( not check_res ) : return _error ( ret , check_msg ) mode = ( ( mode and mode . lower ( ) ) or mode ) if ( mode is None ) : return _error ( ret , 'Mode was not defined. How to process the file?' ) modeswithemptycontent = [ 'delete' ] if ( ( mode not in modeswithemptycontent ) and ( content is None ) ) : return _error ( ret , 'Content can only be empty if mode is {0}' . format ( modeswithemptycontent ) ) del modeswithemptycontent changes = __salt__ [ 'file.line' ] ( name , content , match = match , mode = mode , location = location , before = before , after = after , show_changes = show_changes , backup = backup , quiet = quiet , indent = indent ) if changes : ret [ 'pchanges' ] [ 'diff' ] = changes if __opts__ [ 'test' ] : ret [ 'result' ] = None ret [ 'comment' ] = 'Changes would be made:\ndiff:\n{0}' . format ( changes ) else : ret [ 'result' ] = True ret [ 'comment' ] = 'Changes were made' ret [ 'changes' ] = { 'diff' : changes } else : ret [ 'result' ] = True ret [ 'comment' ] = 'No changes needed to be made' return ret
draws a line from to using the given stroke color and stroke width .