Skip to content

Commit

Permalink
Merge pull request #2 from akamai/development
Browse files Browse the repository at this point in the history
v0.0.5 merged
  • Loading branch information
MikeSchiessl authored Jun 17, 2021
2 parents 8f73614 + 222f327 commit a22a16a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions bin/akamai-mfa
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import os
import json


__VERSION__ = "0.0.4"
__VERSION__ = "0.0.5"
LOG_FMT = '%(asctime)s [%(levelname)s] %(threadName)s %(message)s'
MOST_RECENT_PADDING = 30

Expand Down Expand Up @@ -86,12 +86,12 @@ class MFAConfig():
eventparser.add_argument("--noreceipt", default=False, action="store_true",
help="Discard the receipt attribute to save log space")

self.parser.add_argument("--edgerc", type=argparse.FileType('r'), default="~/.edgerc",
help='Location of the credentials file (default is %s)' % os.path.expanduser("~/.edgerc"))
self.parser.add_argument("--edgerc", type=str, default="~/.edgerc",
help='Location of the credentials file (default is "~/.edgerc")')

self.parser.add_argument("--section", default="default", help="Section inside .edgerc, default is [default]")
self.parser.add_argument("--debug", '-d', action="store_true", default=False, help="Debug mode")
self.parser.add_argument('--user-agent-prefix', dest='ua_prefix', default='Akamai-CLI', help=argparse.SUPPRESS)
self.parser.add_argument('--user-agent-preix', dest='ua_prefix', default='Akamai-CLI', help=argparse.SUPPRESS)

try:
scanned_cli_args = self.parser.parse_args()
Expand All @@ -104,7 +104,7 @@ class MFAConfig():

# 2. Load MFA params from .edgerc
edgerc_config = configparser.ConfigParser()
edgerc_config.read_file(os.path.expanduser(self.edgerc))
edgerc_config.read(os.path.expanduser(self.edgerc))
if not edgerc_config.has_section(self.section):
err_msg = "ERROR: No section named %s was found in your .edgerc file\n" % self.section
err_msg += "ERROR: Please generate credentials for the script functionality\n"
Expand Down
2 changes: 1 addition & 1 deletion cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"commands": [
{
"name": "mfa",
"version": "0.0.4",
"version": "0.0.5",
"description": "Akamai CLI for MFA"
}
]
Expand Down

0 comments on commit a22a16a

Please sign in to comment.