1. dgc
  2. awstools

Commits

dgc  committed 11dca17

aws: perform user aliasing differently in aws.ini

  • Participants
  • Parent commits 14fadb3
  • Branches default

Comments (0)

Files changed (2)

File aws.ini.example

View file
  • Ignore whitespace
 
 
 # You can also define aliases:
-[dgc]
-alias = dgc@uchicago.edu
-
-[dgc.its]
-alias = itservices.aws@uchicago.edu:dgc
+[useralias]
+dgc = dgc@uchicago.edu
+dgc.its = itservices.aws@uchicago.edu:dgc

File aws.py

View file
  • Ignore whitespace
 		if self.user is None and self.cfg.has_option('aws', 'user'):
 			self.user = self.cfg.get('aws', 'user')
 
-		# Perform alias matching
-		while self.user and self.cfg.has_section(self.user) and \
-		      self.cfg.has_option(self.user, 'alias'):
-			self.user = self.cfg.get(self.user, 'alias')
+		# Perform user alias matching
+		while self.user and self.cfg.has_section('useralias') and \
+		      self.cfg.has_option('useralias', self.user):
+			self.user = self.cfg.get('useralias', self.user)
 
 		# If user set, load default attributes
 		if self.user: