def rmdir(path):
 path = os.path.expanduser(path)
 if (not os.path.isabs(path)):
  raise SaltInvocationError('File path must be absolute.')
 if (not os.path.isdir(path)):
  raise SaltInvocationError('A valid directory was not specified.')
 try:
  os.rmdir(path)
  return True
 except OSError as exc:
  return exc.strerror

def rmdir ( path ) : path = os . path . expanduser ( path ) if ( not os . path . isabs ( path ) ) : raise SaltInvocationError ( 'File path must be absolute.' ) if ( not os . path . isdir ( path ) ) : raise SaltInvocationError ( 'A valid directory was not specified.' ) try : os . rmdir ( path ) return True except OSError as exc : return exc . strerror
remove the given dir .