comparison env/lib/python3.7/site-packages/boto/emr/bootstrap_action.py @ 0:26e78fe6e8c4 draft

"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
author shellac
date Sat, 02 May 2020 07:14:21 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26e78fe6e8c4
1 # Copyright (c) 2010 Spotify AB
2 # Copyright (c) 2010 Yelp
3 #
4 # Permission is hereby granted, free of charge, to any person obtaining a
5 # copy of this software and associated documentation files (the
6 # "Software"), to deal in the Software without restriction, including
7 # without limitation the rights to use, copy, modify, merge, publish, dis-
8 # tribute, sublicense, and/or sell copies of the Software, and to permit
9 # persons to whom the Software is furnished to do so, subject to the fol-
10 # lowing conditions:
11 #
12 # The above copyright notice and this permission notice shall be included
13 # in all copies or substantial portions of the Software.
14 #
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
17 # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
18 # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 # IN THE SOFTWARE.
22
23 from boto.compat import six
24
25 class BootstrapAction(object):
26 def __init__(self, name, path, bootstrap_action_args):
27 self.name = name
28 self.path = path
29
30 if isinstance(bootstrap_action_args, six.string_types):
31 bootstrap_action_args = [bootstrap_action_args]
32
33 self.bootstrap_action_args = bootstrap_action_args
34
35 def args(self):
36 args = []
37
38 if self.bootstrap_action_args:
39 args.extend(self.bootstrap_action_args)
40
41 return args
42
43 def __repr__(self):
44 return '%s.%s(name=%r, path=%r, bootstrap_action_args=%r)' % (
45 self.__class__.__module__, self.__class__.__name__,
46 self.name, self.path, self.bootstrap_action_args)