Skip to content

Commit

Permalink
Some basic fixes for 3.6 better support - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ldjebran committed Dec 27, 2019
1 parent 221b166 commit 4a279ff
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ python:
install:
- pip install -U pip
- pip install -r requirements.txt
- pip install 'pytest>=4.0.2' pytest-cov pytest-xdist flake8 codecov unittest2
- pip install 'pytest>=4.0.2'
- pip install pytest-cov pytest-xdist flake8 codecov unittest2
script:
- make lint
- make test
Expand Down
3 changes: 0 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@

Click>=6.0
python-bugzilla>=1.2.2
six>=1.10.0
--editable .
2 changes: 1 addition & 1 deletion robozilla/decorators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def _skip_downstream_condition(bug, sat_version_picker=None):
target_milestone_version = bug['target_milestone']

has_down_and_zstream = downstream_versions and zstream_versions
if has_down_and_zstream and target_milestone_version is 'Unspecified':
if has_down_and_zstream and target_milestone_version == 'Unspecified':
LOGGER.warning('Bugzilla with both downstream and zstream flags and '
'unspecified target_milestone: {}'.format(bug))
return True
Expand Down
2 changes: 1 addition & 1 deletion robozilla/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, files_provider, filters=None, reporter=None, warn=True,
bz_reader=None, environment=None, reader_options=None):

if isinstance(files_provider, six.string_types):
files_provider = FilesProvider(files_provider)
files_provider = FilesProvider(files_provider)

self.files_provider = files_provider
self.filters = filters if filters is not None else [
Expand Down
8 changes: 4 additions & 4 deletions robozilla/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def scan(scan_dir, filters, warn, all, duplicates, clones, depends, echo, user,
reader_options['follow_depends'] = True

if not user and BUGZILLA_ENVIRON_USER_NAME in os.environ:
user = os.environ[BUGZILLA_ENVIRON_USER_NAME]
user = os.environ[BUGZILLA_ENVIRON_USER_NAME]

if not password and BUGZILLA_ENVIRON_USER_PASSWORD_NAME in os.environ:
password = os.environ[BUGZILLA_ENVIRON_USER_PASSWORD_NAME]
password = os.environ[BUGZILLA_ENVIRON_USER_PASSWORD_NAME]

if (user and not password) or (not user and password):
raise Exception('you must provide a user and password')
Expand Down Expand Up @@ -137,10 +137,10 @@ def coverage(exclude_components, include_flags, exclude_flags, start_date,

reader_options = {}
if not user and BUGZILLA_ENVIRON_USER_NAME in os.environ:
user = os.environ[BUGZILLA_ENVIRON_USER_NAME]
user = os.environ[BUGZILLA_ENVIRON_USER_NAME]

if not password and BUGZILLA_ENVIRON_USER_PASSWORD_NAME in os.environ:
password = os.environ[BUGZILLA_ENVIRON_USER_PASSWORD_NAME]
password = os.environ[BUGZILLA_ENVIRON_USER_PASSWORD_NAME]
if (user and not password) or (not user and password):
raise Exception('you must provide a user and password')
if user and password:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

requirements = [
'Click>=6.0',
'python_bugzilla',
'six'
'python-bugzilla>=1.2.2',
'six>=1.10.0',
]
test_requirements = []

Expand Down

0 comments on commit 4a279ff

Please sign in to comment.