Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pr/64'
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteinge committed Dec 11, 2015
2 parents bccbcc5 + e1a454c commit accfa9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pepper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
import optparse
import os
import textwrap
import ConfigParser
import getpass
import time
try:
# Python 3
from configparser import ConfigParser
except ImportError:
# Python 2
import ConfigParser

import pepper

Expand Down Expand Up @@ -191,7 +196,10 @@ def get_login_details(self):
'SALTAPI_EAUTH': 'auto',
}

config = ConfigParser.RawConfigParser()
try:
config = ConfigParser(interpolation=None)
except TypeError as e:
config = ConfigParser.RawConfigParser()
config.read(self.options.config)

# read file
Expand Down Expand Up @@ -324,7 +332,7 @@ def run(self):
load = self.parse_cmd()
creds = iter(self.parse_login())

api = pepper.Pepper(creds.next(), debug_http=self.options.debug_http, ignore_ssl_errors=self.options.ignore_ssl_certificate_errors)
api = pepper.Pepper(next(creds), debug_http=self.options.debug_http, ignore_ssl_errors=self.options.ignore_ssl_certificate_errors)
auth = api.login(*list(creds))

if self.options.fail_if_minions_dont_respond:
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def parse_version_tag(tag):
Returns a tuple of the version number, number of commits (if any), and the
Git SHA (if available).
'''
if isinstance(tag, bytes):
tag = tag.decode()
if not tag or '-g' not in tag:
return tag, None, None

Expand Down

0 comments on commit accfa9c

Please sign in to comment.