Skip to content

Commit 5152fa4

Browse files
committed
Updated the default value for --profile option
1 parent 5b5c56f commit 5152fa4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ec2/spark_ec2.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ def parse_args():
178178
"-i", "--identity-file",
179179
help="SSH private key file to use for logging into instances")
180180
parser.add_option(
181-
"-p", "--profile", default="default",
182-
help=" If you have multiple profiles(aws or boto config), you can configure additional, named profiles by using this option (default: %default)")
181+
"-p", "--profile", default=None,
182+
help=" If you have multiple profiles (aws or boto config), you can configure additional, named profiles by using this option (default: None)")
183183
parser.add_option(
184184
"-t", "--instance-type", default="m1.large",
185185
help="Type of instance to launch (default: %default). " +
@@ -1314,10 +1314,10 @@ def real_main():
13141314
sys.exit(1)
13151315

13161316
try:
1317-
if opts.profile != "default":
1318-
conn = ec2.connect_to_region(opts.region, profile_name=opts.profile)
1319-
else:
1317+
if opts.profile is None:
13201318
conn = ec2.connect_to_region(opts.region)
1319+
else:
1320+
conn = ec2.connect_to_region(opts.region, profile_name=opts.profile)
13211321
except Exception as e:
13221322
print((e), file=stderr)
13231323
sys.exit(1)

0 commit comments

Comments
 (0)