MCPcopy Create free account
hub / github.com/aws/aws-cli / resolve_given_outfile_path

Function resolve_given_outfile_path

awscli/customizations/arguments.py:23–30  ·  view source on GitHub ↗

Asserts that a path is writable and returns the expanded path

(path)

Source from the content-addressed store, hash-verified

21
22
23def resolve_given_outfile_path(path):
24 """Asserts that a path is writable and returns the expanded path"""
25 if path is None:
26 return
27 outfile = os.path.expanduser(os.path.expandvars(path))
28 if not os.access(os.path.dirname(os.path.abspath(outfile)), os.W_OK):
29 raise ParamValidationError('Unable to write to file: %s' % outfile)
30 return outfile
31
32
33def is_parsed_result_successful(parsed_result):

Calls 1