Skip to content

Commit

Permalink
fix coding norm check in hosts.py (#1174)
Browse files Browse the repository at this point in the history
`pynorms` test is trapping a error in `hosts.py` on the conditional for singularity container that is now fixed.

Also start ignoring git hidden directories from pynorms.
  • Loading branch information
aerorahul authored Dec 13, 2022
1 parent 3e53e06 commit bf06289
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pynorms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Run pycodestyle
run: |
cd $GITHUB_WORKSPACE/global-workflow
pycodestyle -v --config ./.pycodestyle .
pycodestyle -v --config ./.pycodestyle --exclude='.git,.github' ./
4 changes: 2 additions & 2 deletions workflow/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, host=None):
def detect(cls):

machine = 'NOTFOUND'
container = os.getenv('SINGULARITY_NAME')
container = os.getenv('SINGULARITY_NAME', None)

if os.path.exists('/scratch1/NCEPDEV'):
machine = 'HERA'
Expand All @@ -44,7 +44,7 @@ def detect(cls):
machine = 'WCOSS2'
elif os.path.exists('/data/prod'):
machine = 'S4'
elif container != None:
elif container is not None:
machine = 'CONTAINER'

if machine not in Host.SUPPORTED_HOSTS:
Expand Down

0 comments on commit bf06289

Please sign in to comment.